From f3709add2d989b76727c5b78ad6c2c8694617464 Mon Sep 17 00:00:00 2001 From: Moritz Strohm <strohm@data-quest.de> Date: Thu, 21 Mar 2024 15:07:44 +0000 Subject: [PATCH] CalendarNavigation: use current date as default date in calendar URLs, fixes #3847 Closes #3847 Merge request studip/studip!2729 --- 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