Store recurrence-id for single (non-recurring) events and use for iTip replies

This commit is contained in:
Thomas Bruederli 2015-02-19 15:13:13 +01:00
parent b47b13a35e
commit ac2bd4700f
3 changed files with 5 additions and 2 deletions

View file

@ -364,7 +364,7 @@ class libcalendaring_itip
// check if the given itip object matches the last state
if ($existing) {
$latest = (isset($event['sequence']) && $existing['sequence'] == $event['sequence']) ||
$latest = (isset($event['sequence']) && intval($existing['sequence']) == intval($event['sequence'])) ||
(!isset($event['sequence']) && $existing['changed'] && $existing['changed'] >= $event['changed']);
}

View file

@ -1411,7 +1411,7 @@ class libcalendaring extends rcube_plugin
public static function identify_recurrence_instance(&$object)
{
// for savemode=all, remove recurrence instance identifiers
if (!empty($object['_savemode']) && $object['_savemode'] == 'all') {
if (!empty($object['_savemode']) && $object['_savemode'] == 'all' && $object['recurrence']) {
unset($object['_instance'], $object['recurrence_date']);
}
// set instance and 'savemode' according to recurrence-id

View file

@ -122,6 +122,9 @@ class kolab_format_event extends kolab_format_xcal
}
$this->obj->setExceptions($vexceptions);
}
else if ($object['recurrence_date'] && $object['recurrence_date'] instanceof DateTime) {
$this->obj->setRecurrenceID(self::get_datetime($object['recurrence_date'], null, $object['allday']), (bool)$object['thisandfuture']);
}
// cache this data
$this->data = $object;