Fix ical export after last commit
This commit is contained in:
parent
8a90069071
commit
f78af8b09f
2 changed files with 4 additions and 4 deletions
|
@ -291,7 +291,7 @@ class kolab_calendar extends kolab_storage_folder_api
|
||||||
}
|
}
|
||||||
|
|
||||||
// find and merge exception for the first instance
|
// find and merge exception for the first instance
|
||||||
if (!empty($event['recurrence']) && is_array($event['recurrence']['EXCEPTIONS'])) {
|
if ($virtual && !empty($event['recurrence']) && is_array($event['recurrence']['EXCEPTIONS'])) {
|
||||||
$event_date = $event['start']->format('Ymd');
|
$event_date = $event['start']->format('Ymd');
|
||||||
foreach ($event['recurrence']['EXCEPTIONS'] as $exception) {
|
foreach ($event['recurrence']['EXCEPTIONS'] as $exception) {
|
||||||
$exdate = $exception['recurrence_date'] ? $exception['recurrence_date']->format('Ymd') : substr($exception['_instance'], 0, 8);
|
$exdate = $exception['recurrence_date'] ? $exception['recurrence_date']->format('Ymd') : substr($exception['_instance'], 0, 8);
|
||||||
|
|
|
@ -1674,10 +1674,10 @@ class kolab_driver extends calendar_driver
|
||||||
unset($record['recurrence']);
|
unset($record['recurrence']);
|
||||||
|
|
||||||
// add instance identifier to first occurrence (master event)
|
// add instance identifier to first occurrence (master event)
|
||||||
|
// do not add 'recurrence_date' though in order to keep the master even being exported as such
|
||||||
if ($record['recurrence'] && !$record['recurrence_id'] && !$record['_instance']) {
|
if ($record['recurrence'] && !$record['recurrence_id'] && !$record['_instance']) {
|
||||||
$recurrence_id_format = $event['allday'] ? 'Ymd' : 'Ymd\THis';
|
$recurrence_id_format = $record['allday'] ? 'Ymd' : 'Ymd\THis';
|
||||||
$record['recurrence_date'] = $record['start'];
|
$record['_instance'] = $record['start']->format($recurrence_id_format);
|
||||||
$record['_instance'] = $record['recurrence_date']->format($recurrence_id_format);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove internals
|
// remove internals
|
||||||
|
|
Loading…
Add table
Reference in a new issue