From a3400010a739dbc227a0cb62531e151d6896e38d Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 8 Dec 2020 12:30:49 -0700 Subject: [PATCH] * Calendar: Show correct event date when notified of a single cancelled recurring event --- calendar/inc/class.calendar_uiforms.inc.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 538a54afd6..1a114edbfa 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -2103,6 +2103,14 @@ class calendar_uiforms extends calendar_ui // convert event from servertime returned by calendar_ical to user-time $this->bo->server2usertime($event); + // Check if this is an exception + if($event['recur_type'] && count($event['recur_exception']) && !$event['recurrence']) + { + $diff = $event['recur_exception'][0] - $event['start']; + $event['start'] += $diff; + $event['end'] += $diff; + } + if (($existing_event = $this->bo->read($event['uid'], $event['recurrence'], false, 'ts', null, true)) && // true = read the exception !$existing_event['deleted']) {