summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-02-27 11:02:49 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-02-27 11:02:49 (GMT)
commit3ba55540fd1e9ec68964b40a88344e03911640a8 (patch)
tree7c0ccc7546000d232f7bf99827ac1219896561b9 /plugins
parent2e8eb8596fcf1729441e8301f1977f394cc56bab (diff)
downloadroundcubemail-plugins-kolab-3ba55540fd1e9ec68964b40a88344e03911640a8.tar.gz
Don't copy exceptions array and private properties (_*) to exceptions
Diffstat (limited to 'plugins')
-rw-r--r--plugins/libkolab/lib/kolab_format_event.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/libkolab/lib/kolab_format_event.php b/plugins/libkolab/lib/kolab_format_event.php
index 3207927..a1ff5b3 100644
--- a/plugins/libkolab/lib/kolab_format_event.php
+++ b/plugins/libkolab/lib/kolab_format_event.php
@@ -133,6 +133,10 @@ class kolab_format_event extends kolab_format_xcal
}
if ($object['recurrence_date'] && $object['recurrence_date'] instanceof DateTime) {
+ if ($object['recurrence']) {
+ // unset recurrence_date for master events with rrule
+ $object['recurrence_date'] = null;
+ }
$this->obj->setRecurrenceID(self::get_datetime($object['recurrence_date'], null, $object['allday']), (bool)$object['thisandfuture']);
}
@@ -294,7 +298,7 @@ class kolab_format_event extends kolab_format_xcal
*/
private function compact_exception($exception, $master)
{
- $forbidden = array('recurrence','organizer','_attachments');
+ $forbidden = array('recurrence','exceptions','organizer','_attachments');
foreach ($forbidden as $prop) {
if (array_key_exists($prop, $exception)) {
@@ -316,7 +320,8 @@ class kolab_format_event extends kolab_format_xcal
$is_recurring = !empty($master['recurrence']);
foreach ($master as $prop => $value) {
- if (empty($exception[$prop]) && !empty($value) && ($is_recurring || in_array($prop, array('uid','organizer','_attachments')))) {
+ if (empty($exception[$prop]) && !empty($value) && $prop != 'exceptions' && $prop[0] != '_'
+ && ($is_recurring || in_array($prop, array('uid','organizer','_attachments')))) {
$exception[$prop] = $value;
if ($prop == 'recurrence') {
unset($exception[$prop]['EXCEPTIONS']);