Calendar: Make sure account is set for alarm

This commit is contained in:
nathangray 2021-04-28 11:20:43 -06:00
parent 3f3748dc87
commit 56ac5d5be8

View File

@ -1480,7 +1480,10 @@ class calendar_boupdate extends calendar_bo
$this->enum_groups($expanded); $this->enum_groups($expanded);
foreach($event['alarm'] as $id => &$alarm) foreach($event['alarm'] as $id => &$alarm)
{ {
$alarm['time'] = $this->date2ts($alarm['time'],true); // user to server-time if($alarm['time'])
{
$alarm['time'] = $this->date2ts($alarm['time'], true); // user to server-time
}
// remove alarms belonging to not longer existing or rejected participants // remove alarms belonging to not longer existing or rejected participants
if ($alarm['owner'] && isset($expanded['participants'])) if ($alarm['owner'] && isset($expanded['participants']))
@ -1496,6 +1499,10 @@ class calendar_boupdate extends calendar_bo
//error_log(__LINE__.': '.__METHOD__."(".array2string($event).") deleting alarm=".array2string($alarm).", $status=".array2string($alarm)); //error_log(__LINE__.': '.__METHOD__."(".array2string($event).") deleting alarm=".array2string($alarm).", $status=".array2string($alarm));
} }
} }
else if (!$alarm['owner'])
{
$alarm['owner'] = $event['owner'];
}
} }
} }
// update all existing alarm times, in case alarm got moved and alarms are not include in $event // update all existing alarm times, in case alarm got moved and alarms are not include in $event