summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/calendar/drivers/kolab/kolab_calendar.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/calendar/drivers/kolab/kolab_calendar.php b/plugins/calendar/drivers/kolab/kolab_calendar.php
index 9eb70bd..9427b1c 100644
--- a/plugins/calendar/drivers/kolab/kolab_calendar.php
+++ b/plugins/calendar/drivers/kolab/kolab_calendar.php
@@ -267,9 +267,18 @@ class kolab_calendar
$add = true;
// skip the first instance of a recurring event if listed in exdate
- if ($virtual && !empty($event['recurrence']['EXDATE'])) {
+ if ($virtual && (!empty($event['recurrence']['EXDATE']) || !empty($event['recurrence']['EXCEPTIONS']))) {
$event_date = $event['start']->format('Ymd');
- foreach ($event['recurrence']['EXDATE'] as $exdate) {
+ $exdates = (array)$event['recurrence']['EXDATE'];
+
+ // add dates from exceptions to list
+ if (is_array($event['recurrence']['EXCEPTIONS'])) {
+ foreach ($event['recurrence']['EXCEPTIONS'] as $exception) {
+ $exdates[] = clone $exception['start'];
+ }
+ }
+
+ foreach ($exdates as $exdate) {
if ($exdate->format('Ymd') == $event_date) {
$add = false;
break;