summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-11-29 19:23:17 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-11-29 19:23:17 (GMT)
commitf1dce1f5b9b097ffaf6a3fc5ff925a120273f49b (patch)
treef11535d0e279427a65e367e2204234c21af2d78d /plugins
parentbe12aa582765211c1c679f52eacb7acc654df496 (diff)
downloadroundcubemail-plugins-kolab-f1dce1f5b9b097ffaf6a3fc5ff925a120273f49b.tar.gz
Also consider exceptions when checking if first instance is to be listed (#2625)
Diffstat (limited to 'plugins')
-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;