From 6923699f90b14897dbe4a530dad534f68ef21376 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Tue, 31 May 2011 16:28:12 +0200 Subject: [PATCH] Fix recurrence end time and save exclusions in kolab backend --- plugins/calendar/drivers/kolab/kolab_calendar.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/calendar/drivers/kolab/kolab_calendar.php b/plugins/calendar/drivers/kolab/kolab_calendar.php index bc8f3fe2..a52d8f33 100644 --- a/plugins/calendar/drivers/kolab/kolab_calendar.php +++ b/plugins/calendar/drivers/kolab/kolab_calendar.php @@ -200,7 +200,7 @@ class kolab_calendar if ($recurrence['range-type'] == 'number') $rrule['COUNT'] = intval($recurrence['range']); else if ($recurrence['range-type'] == 'date') - $rrule['UNTIL'] = strtotime($recurrence['range']); + $rrule['UNTIL'] = $recurrence['range']; if ($recurrence['day']) { $byday = array(); @@ -220,7 +220,10 @@ class kolab_calendar $rrule['BYMONTH'] = strtolower($monthmap[$recurrence['month']]); } - // TODO: handle exclusions (not yet supported by the internal format) + if ($recurrence['exclusion']) { + foreach ((array)$recurrence['exclusion'] as $excl) + $rrule['EXDATE'][] = strtotime($excl); + } } $sensitivity_map = array_flip($this->sensitivity_map);