fix status was NOT set on exception, but all future events, due to a broken fix

This commit is contained in:
ralf 2024-08-22 11:56:34 +02:00
parent 4ba8866d9c
commit c08555ee08
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -604,7 +604,7 @@ class calendar_uiforms extends calendar_ui
{
//echo "<p>$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);