[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [FIX] Perspective: Group default homepage overrides active perspective

"Jean-Marc Kadimba \(@jmkadimba\) via TikiWiki-cvs" <[email protected]> Fri, 24 Jul 2026 10:52:04 +0000
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a6343d4bafd9_381df28ec729fd@gitlab-sidekiq-low-urgency-cpu-bound-v2-7d8cd68bcd-fjg7t.mail>

Jean-Marc Kadimba pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki


Commits:
ce43288a by Jean-Marc Kadimba at 2026-07-24T12:51:54+02:00
[FIX] Perspective: Group default homepage overrides active perspective
---
* [FIX] Perspective: Group default homepage overrides active perspective

* [FIX] Perspective: Group default homepage overrides active perspective (Redirect to the perspective homepage when the perspective has just changed)

* [FIX] Perspective: Group default homepage overrides active perspective

See merge request tikiwiki/tiki!10604


(cherry picked from commit 6677ee5e1901b0e8b6176c3acd6d144a65405972)

8cbfe324 [FIX] Perspective: Group default homepage overrides active perspective
784b307c [FIX] Perspective: Group default homepage overrides active perspective...
9a868b45 [FIX] Perspective: Group default homepage overrides active perspective

Co-authored-by: Jean-Marc Kadimba <[email protected]>

(cherry picked from commit df62cd3e09c703dcca0074701c6e76e0bfbd51d9)

Co-authored-by: Jean-Marc Kadimba <[email protected]>

(cherry picked from commit 5644c1834b262e2233807e39296eee9daef35887)

Co-authored-by: Jean-Marc Kadimba <[email protected]>
- - - - -


1 changed file:

- lib/userslib.php


Changes:

=====================================
lib/userslib.php
=====================================
@@ -3129,6 +3129,18 @@ class UsersLib extends TikiLib
     {
         global $prefs;
 
+        $perspectivelib = TikiLib::lib('perspective');
+        $perspectiveId = $perspectivelib->get_current_perspective($prefs);
+
+        if ($perspectiveId) {
+            // Always redirect to the perspective homepage while a perspective with its own homepage is selected, not just the first time it is switched to.
+            $perspectivePreferences = $perspectivelib->get_preferences($perspectiveId);
+            if (! empty($perspectivePreferences['wikiHomePage'])) {
+                return $perspectivePreferences['wikiHomePage'];
+            }
+            // Perspective has no homepage of its own — fall through to group home logic below.
+        }
+
         if ($prefs['useGroupHome'] !== 'y') {
             return $prefs['wikiHomePage'];
         }



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/ce43288a3afd0561cccc3481fdfc4f25ee34f212

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/ce43288a3afd0561cccc3481fdfc4f25ee34f212
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs