From 09cefbb2e4fddacda494ffaf1d8bf4404ffe385c Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 14 Jan 2021 14:19:45 -0700 Subject: [PATCH] * Calendar: Fix event notifications had the wrong times in iCal attachment if user timezone was not server timezone --- calendar/inc/class.calendar_boupdate.inc.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index f8b79dd27e..1dea3d12b0 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -247,16 +247,8 @@ class calendar_boupdate extends calendar_bo if ($event['videoconference'] && !empty($event['##videoconference']) && class_exists('EGroupware\\Status\\Videoconference\\Call') && !EGroupware\Status\Hooks::isVideoconferenceDisabled() && ($videoconferenceResId = \EGroupware\Status\Hooks::getVideoconferenceResourceId())) { - $participant_total = 0; - foreach(['u','e','c'] as $p_type) - { - if(is_array($event['participant_types'][$p_type])) - { - $participant_total += count($event['participant_types'][$p_type]); - } - } $event['participant_types']['r'][$videoconferenceResId] = - $event['participants']['r'.$videoconferenceResId] = 'A'.$participant_total; + $event['participants']['r'.$videoconferenceResId] = 'A'.(count($event['participant_types']['u']) + count($event['participant_types']['e']) + count($event['participant_types']['c'])); } // check for conflicts only happens !$ignore_conflicts AND if start + end date are given @@ -1140,7 +1132,7 @@ class calendar_boupdate extends calendar_bo $calendar_ical->setSupportedFields('full'); // full iCal fields+event TZ // we need to pass $event[id] so iCal class reads event again, // as event is in user TZ, but iCal class expects server TZ! - $ics = $calendar_ical->exportVCal([$cleared_event], + $ics = $calendar_ical->exportVCal($cleared_event, '2.0', $method, $cleared_event['recur_date'], '', 'utf-8', $method == 'REPLY' ? $user : 0 );