From 93254901ed69297ee71bf20e0579e77d54ef632e Mon Sep 17 00:00:00 2001 From: Moritz Strohm <strohm@data-quest.de> Date: Thu, 21 Mar 2024 16:05:04 +0100 Subject: [PATCH] CalendarNavigation: use current date as default date in calendar URLs --- lib/navigation/CalendarNavigation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/navigation/CalendarNavigation.php b/lib/navigation/CalendarNavigation.php index f201d86c782..6b59d02d196 100644 --- a/lib/navigation/CalendarNavigation.php +++ b/lib/navigation/CalendarNavigation.php @@ -21,7 +21,7 @@ class CalendarNavigation extends Navigation public function __construct() { $title = _('Kalender'); - $main_url = URLHelper::getURL('dispatch.php/calendar/calendar'); + $main_url = URLHelper::getURL('dispatch.php/calendar/calendar', ['defaultDate' => date('Y-m-d')]); if (!$GLOBALS['perm']->have_perm('admin') && Config::get()->SCHEDULE_ENABLE) { $title = _('Stundenplan'); $main_url = URLHelper::getURL('dispatch.php/calendar/schedule'); @@ -47,7 +47,7 @@ class CalendarNavigation extends Navigation } if (Config::get()->CALENDAR_ENABLE) { - $navigation = new Navigation(_('Kalender'), 'dispatch.php/calendar/calendar'); + $navigation = new Navigation(_('Kalender'), 'dispatch.php/calendar/calendar', ['defaultDate' => date('Y-m-d')]); $this->addSubNavigation('calendar', $navigation); } } -- GitLab