From 32c9e1b6bb0cf1f2e08a648620b138e8fe81fb0a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 1 Mar 2021 15:39:44 +0200 Subject: [PATCH] * CalDAV/Calendar: participants without status were not imported for new events (eg. from Thunderbird) --- calendar/inc/class.calendar_ical.inc.php | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/calendar/inc/class.calendar_ical.inc.php b/calendar/inc/class.calendar_ical.inc.php index bc091e4af0..ee806f5f19 100644 --- a/calendar/inc/class.calendar_ical.inc.php +++ b/calendar/inc/class.calendar_ical.inc.php @@ -1499,21 +1499,18 @@ class calendar_ical extends calendar_boupdate if (!is_array($event['participants'])) $event['participants'] = array(); $event['participants'][$event['owner']] = $status; } - else + foreach ($event['participants'] as $uid => $status) { - foreach ($event['participants'] as $uid => $status) + // if the client did not give us a proper status => set default + if ($status[0] == 'X') { - // if the client did not give us a proper status => set default - if ($status[0] == 'X') + if ($uid == $event['owner']) { - if ($uid == $event['owner']) - { - $event['participants'][$uid] = calendar_so::combine_status('A', 1, 'CHAIR'); - } - else - { - $event['participants'][$uid] = calendar_so::combine_status('U'); - } + $event['participants'][$uid] = calendar_so::combine_status('A', 1, 'CHAIR'); + } + else + { + $event['participants'][$uid] = calendar_so::combine_status('U'); } } }