[TikiWiki-commits] [Git][tikiwiki/tiki][master] [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 <6a1dfbd0aefbf_3819490c34028@gitlab-sidekiq-low-urgency-cpu-bound-v2-5d547c549d-rmh8r.mail>

Adrien Mbuya Maloba pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
662b683c by Adrien Mbuya Maloba at 2026-06-02T00:20:25+03:00
[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

- - - - -


1 changed file:

- modules/mod-func-calendar_new.php


Changes:

=====================================
modules/mod-func-calendar_new.php
=====================================
@@ -198,18 +198,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)) {
@@ -224,6 +212,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/662b683c574b28121cd777738bf2ed14e78a0618

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/662b683c574b28121cd777738bf2ed14e78a0618
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.