From 8ec9b613ca27ef1e4d4e19f195998b63e438a361 Mon Sep 17 00:00:00 2001 From: Moritz Strohm Date: Mon, 22 Jan 2024 14:43:49 +0100 Subject: fixed PHP8 warning --- app/controllers/calendar/date.php | 2 ++ app/views/calendar/date/index.php | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/controllers/calendar/date.php b/app/controllers/calendar/date.php index 8b8435e..32cf99c 100644 --- a/app/controllers/calendar/date.php +++ b/app/controllers/calendar/date.php @@ -130,6 +130,7 @@ class Calendar_DateController extends AuthenticatedController ['calendar_date_id' => $this->date->id] ); $this->participation_message = null; + $this->user_participation_status = ''; $this->all_assignments_writable = false; $this->is_group_date = count($this->calendar_assignments) > 1; @@ -140,6 +141,7 @@ class Calendar_DateController extends AuthenticatedController //according to the participation status. foreach ($this->calendar_assignments as $index => $assignment) { if ($assignment->range_id === $GLOBALS['user']->id && $this->is_group_date) { + $this->user_participation_status = $assignment->participation; if ($assignment->participation === 'ACCEPTED') { $this->participation_message = MessageBox::info(_('Sie nehmen am Termin teil.')); } elseif ($assignment->participation === 'DECLINED') { diff --git a/app/views/calendar/date/index.php b/app/views/calendar/date/index.php index 198fe4c..faec7c7 100644 --- a/app/views/calendar/date/index.php +++ b/app/views/calendar/date/index.php @@ -7,28 +7,28 @@ action="link_for('calendar/date/participation/' . $date->id) ?>">
- participation) : ?> + - participation !== 'ACCEPTED') : ?> + - participation !== 'DECLINED') : ?> + - participation !== 'ACKNOWLEDGED') : ?> +