Branch 'roundcubemail-plugins-kolab-3.1' - plugins/calendar
Thomas Brüderli
bruederli at kolabsys.com
Fri Nov 29 20:24:34 CET 2013
plugins/calendar/drivers/kolab/kolab_calendar.php | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 4b7a750c0df298502dd58281b3a535ac4d4b0beb
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Fri Nov 29 20:23:17 2013 +0100
Also consider exceptions when checking if first instance is to be listed (#2625)
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;
More information about the commits
mailing list