Fix PHP8 warnings

This commit is contained in:
Aleksander Machniak 2023-08-01 10:47:02 +02:00
parent 83fd802cc4
commit 1b212f3ee2
2 changed files with 8 additions and 5 deletions

View file

@ -2994,7 +2994,7 @@ $("#rcmfd_new_category").keypress(function(event) {
// TODO: skip events with free_busy == 'free' ? // TODO: skip events with free_busy == 'free' ?
if ($event['uid'] == $data['uid'] if ($event['uid'] == $data['uid']
|| $event['end'] < $day_start || $event['start'] > $day_end || $event['end'] < $day_start || $event['start'] > $day_end
|| $event['status'] == 'CANCELLED' || (!empty($event['status']) && $event['status'] == 'CANCELLED')
|| (!empty($event['className']) && strpos($event['className'], 'declined') !== false) || (!empty($event['className']) && strpos($event['className'], 'declined') !== false)
) { ) {
continue; continue;

View file

@ -62,15 +62,18 @@ class kolab_format_event extends kolab_format_xcal
// do the hard work of setting object values // do the hard work of setting object values
$this->obj->setStart(self::get_datetime($object['start'], null, !empty($object['allday']))); $this->obj->setStart(self::get_datetime($object['start'], null, !empty($object['allday'])));
$this->obj->setEnd(self::get_datetime($object['end'], null, !empty($object['allday']))); $this->obj->setEnd(self::get_datetime($object['end'], null, !empty($object['allday'])));
$this->obj->setTransparency($object['free_busy'] == 'free'); $this->obj->setTransparency(!empty($object['free_busy']) && $object['free_busy'] == 'free');
$status = kolabformat::StatusUndefined; $status = kolabformat::StatusUndefined;
if ($object['free_busy'] == 'tentative') if (!empty($object['free_busy']) && $object['free_busy'] == 'tentative') {
$status = kolabformat::StatusTentative; $status = kolabformat::StatusTentative;
if (!empty($object['cancelled'])) }
if (!empty($object['cancelled'])) {
$status = kolabformat::StatusCancelled; $status = kolabformat::StatusCancelled;
else if (!empty($object['status']) && array_key_exists($object['status'], $this->status_map)) }
else if (!empty($object['status']) && array_key_exists($object['status'], $this->status_map)) {
$status = $this->status_map[$object['status']]; $status = $this->status_map[$object['status']];
}
$this->obj->setStatus($status); $this->obj->setStatus($status);
// save (recurrence) exceptions // save (recurrence) exceptions