Skip to content
Snippets Groups Projects
Commit f3709add authored by Moritz Strohm's avatar Moritz Strohm
Browse files

CalendarNavigation: use current date as default date in calendar URLs, fixes #3847

Closes #3847

Merge request studip/studip!2729
parent 833fdebf
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment