From c08555ee08aa96c2a85bc85e39b1d6c7f9a6165c Mon Sep 17 00:00:00 2001 From: ralf Date: Thu, 22 Aug 2024 11:56:34 +0200 Subject: [PATCH] fix status was NOT set on exception, but all future events, due to a broken fix --- calendar/inc/class.calendar_boupdate.inc.php | 2 +- calendar/inc/class.calendar_uiforms.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index 38aa313edd..ff31b4dca0 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -1954,7 +1954,7 @@ class calendar_boupdate extends calendar_bo return false; } // make sure to not set a recur_date for a non-recurring event (as recur_date has to be 0, for non-recurring events!) - if ($recur_date && ($event = $event || $this->read($cal_id, null, $ignore_acl)) && empty($event['recur_type'])) + if ($recur_date && (is_array($event) || ($event=$this->read($cal_id, null, $ignore_acl))) && empty($event['recur_type'])) { $recur_date = 0; } diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 0f201fc237..e207b8192a 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -604,7 +604,7 @@ class calendar_uiforms extends calendar_ui { //echo "

$uid: status changed '$data[old_status]' --> '$status<'/p>\n"; $new_status = calendar_so::combine_status($status, $quantity, $role); - if ($this->bo->set_status($event['id'],$uid,$new_status,isset($content['edit_single']) ? $content['participants']['status_date'] : 0, false, true, $content['no_notifications'])) + if ($this->bo->set_status($event['id'],$uid,$new_status,isset($content['edit_single']) ? $content['participants']['status_date'] : 0, false, true, $content['no_notifications']??false)) { // Update main window $d = new Api\DateTime($content['edit_single'], Api\DateTime::$user_timezone);