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

"MAGENE Sem Joel \(@Jomagene\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69fd13169d535_38191284767@gitlab-sidekiq-low-urgency-cpu-bound-v2-654877c9d5-qgbmn.mail>

MAGENE Sem Joel pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki


Commits:
0bd7884b by MAGENE Sem Joel at 2026-05-07T22:25:46+00:00
[BP][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
---
* [FIX] Action Calendar: fix CalendarLib loading and module focus date when feature_calendar is disabled

See merge request tikiwiki/tiki!10105

(cherry picked from commit bd0318670b639155a7f209720cc5f27ab224a2ff)

See merge request tikiwiki/tiki!10168

- - - - -


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/0bd7884b392d0bcc31347dfe578845d527b8fcb9

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