Fix recurrence end time and save exclusions in kolab backend

This commit is contained in:
Thomas Bruederli 2011-05-31 16:28:12 +02:00
parent 4f46f97d6f
commit 6923699f90

View file

@ -200,7 +200,7 @@ class kolab_calendar
if ($recurrence['range-type'] == 'number') if ($recurrence['range-type'] == 'number')
$rrule['COUNT'] = intval($recurrence['range']); $rrule['COUNT'] = intval($recurrence['range']);
else if ($recurrence['range-type'] == 'date') else if ($recurrence['range-type'] == 'date')
$rrule['UNTIL'] = strtotime($recurrence['range']); $rrule['UNTIL'] = $recurrence['range'];
if ($recurrence['day']) { if ($recurrence['day']) {
$byday = array(); $byday = array();
@ -220,7 +220,10 @@ class kolab_calendar
$rrule['BYMONTH'] = strtolower($monthmap[$recurrence['month']]); $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); $sensitivity_map = array_flip($this->sensitivity_map);