[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Action Calendar: fix CalendarLib loading and module focus date when...

"Adrien Mbuya Maloba \(@adrienmaloba\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69fc98e142d_3819021c9702@gitlab-sidekiq-low-urgency-cpu-bound-v2-74cfb7f9d4-nwjvp.mail>

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


Commits:
bd031867 by MAGENE Sem Joel at 2026-05-07T16:26:40+03:00
[FIX] Action Calendar: fix CalendarLib loading and module focus date when feature_calendar is disabled
---
* [FIX] Action Calendar: fix CalendarLib loading and module focus date when feature_calendar is disabled

See merge request tikiwiki/tiki!10105

- - - - -


3 changed files:

- lib/calendar/tikicalendarlib.php
- modules/mod-func-action_calendar.php
- tiki-action_calendar.php


Changes:

=====================================
lib/calendar/tikicalendarlib.php
=====================================
@@ -4,6 +4,10 @@
 //
 // All Rights Reserved. See copyright.txt for details and a complete list of authors.
 // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
+
+if (! class_exists('CalendarLib', false)) {
+    require_once __DIR__ . '/calendarlib.php';
+}
 /**
  *
  */


=====================================
modules/mod-func-action_calendar.php
=====================================
@@ -41,6 +41,8 @@ function module_action_calendar($mod_reference, &$module_params)
         $group_by = 'day';
 
         include('tiki-calendar_setup.php');
+        $moduleCalendarFocusdate = isset($focusdate) ? TikiLib::date_format('%Y-%m-%d', $focusdate) : date('Y-m-d');
+        $smarty->assign('moduleCalendarFocusdate', $moduleCalendarFocusdate);
 
         $viewTikiCals = $tikicalendarlib->getTikiItems(false);
         if (isset($module_params['items'])) {


=====================================
tiki-action_calendar.php
=====================================
@@ -32,9 +32,9 @@ use Tiki\Sections;
 $section = Sections::SECTION_ADMIN_LAYOUT;
 Sections::setCurrentSection($section);
 
-$tikicalendarlib = TikiLib::lib('tikicalendar');
 $access->check_feature('feature_action_calendar');
 $access->check_permission('tiki_p_view_tiki_calendar');
+$tikicalendarlib = TikiLib::lib('tikicalendar');
 //get_strings tra('Tiki Calendar')
 
 $headerlib->add_cssfile('themes/base_files/feature_css/calendar.css', 20);



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

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