From 665432270741c0a98cea199bfb0bf238b7a4595e Mon Sep 17 00:00:00 2001 From: Moritz Strohm <strohm@data-quest.de> Date: Mon, 18 Mar 2024 20:55:36 +0000 Subject: [PATCH] \Studip\Calendar\Helper::getDefaultCalendarDate: regard "defaultDate" as additional source for a date in the URL, fixes #3813 Closes #3813 Merge request studip/studip!2707 --- lib/classes/calendar/Helper.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/classes/calendar/Helper.php b/lib/classes/calendar/Helper.php index 10294f42a99..cd3163afe2c 100644 --- a/lib/classes/calendar/Helper.php +++ b/lib/classes/calendar/Helper.php @@ -73,8 +73,12 @@ class Helper public static function getDefaultCalendarDate() : \DateTime { $default_date = new \DateTime(); - if (\Request::submitted('date')) { - $date = \Request::getDateTime('date', 'Y-m-d'); + if (\Request::submitted('date') || \Request::submitted('defaultDate')) { + $parameter_name = 'date'; + if (\Request::submitted('defaultDate')) { + $parameter_name = 'defaultDate'; + } + $date = \Request::getDateTime($parameter_name, 'Y-m-d'); if ($date instanceof \DateTime) { $default_date = $date; //Update the session value: -- GitLab