[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] module calendar_new/wikiplugin-calendar: fix event display for selected calendars

"Adrien Mbuya Maloba \(@adrienmaloba\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a2aaf79a714_38195ba46678d@gitlab-sidekiq-low-urgency-cpu-bound-v2-69866f7b86-c7jf5.mail>

Adrien Mbuya Maloba pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
a1db9aef by Adrien Mbuya Maloba at 2026-06-11T15:45:29+03:00
[BP][FIX] module calendar_new/wikiplugin-calendar: fix event display for selected calendars
---
* [FIX] module calendar_new/wikiplugin-calendar: fix event display for selected calendars
---
* [FIX] module calendar_new/wikiplugin-calendar: fix event display for selected calendars
---
* [FIX] module calendar_new/wikiplugin-calendar: fix event display for selected calendars

See merge request tikiwiki/tiki!10188

See merge request tikiwiki/tiki!10489

See merge request tikiwiki/tiki!10491

- - - - -


1 changed file:

- modules/mod-func-calendar_new.php


Changes:

=====================================
modules/mod-func-calendar_new.php
=====================================
@@ -184,18 +184,6 @@ function module_calendar_new($mod_reference, $module_params)
     }
 
     if (! empty($calIds)) {
-        $tc_infos = $calendarlib->getCalendar($calIds, $viewstart, $viewend, 'day', 'events', true);
-        if ($_REQUEST['viewlistmodule'] == 'list') {
-            foreach ($tc_infos['listevents'] as $i => $e) {
-                $tc_infos['listevents'][$i]['head'] = '';
-                $tc_infos['listevents'][$i]['group_description'] = '';
-            }
-        }
-
-        foreach ($tc_infos as $tc_key => $tc_val) {
-            $smarty->assign($tc_key, $tc_val);
-        }
-
         $checkedCalIds = [];
         $moduleCalendarViewGroups = $_SESSION['ModuleCalendarViewGroups'] ?? null;
         if (is_array($moduleCalendarViewGroups)) {
@@ -210,6 +198,23 @@ function module_calendar_new($mod_reference, $module_params)
             $displayedcals = $calIds;
             $checkedCalIds = $calIds;
         }
+        // Select only events from checked calendars in list view
+        if (! empty($checkedCalIds)) {
+            $calIds = $checkedCalIds;
+        }
+
+        $tc_infos = $calendarlib->getCalendar($calIds, $viewstart, $viewend, 'day', 'events', true);
+
+        if ($_REQUEST['viewlistmodule'] == 'list') {
+            foreach ($tc_infos['listevents'] as $i => $e) {
+                $tc_infos['listevents'][$i]['head'] = '';
+                $tc_infos['listevents'][$i]['group_description'] = '';
+            }
+        }
+
+        foreach ($tc_infos as $tc_key => $tc_val) {
+            $smarty->assign($tc_key, $tc_val);
+        }
 
         $smarty->assign('viewnavbar', $module_params['viewnavbar']);
         $smarty->assign('name', 'calendar_new');



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

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a1db9aef995649291582e8dbf04123e4c964c903
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.