summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-07-04 14:58:18 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-07-04 14:58:43 (GMT)
commit873516681fde288c7a27743174ed4af39ae38a66 (patch)
treec95738681ca134333b3bc40ee440a12b26f0ae23 /plugins
parentce24ff2d6ddb518ef65e15c82ca48cf72725039b (diff)
downloadroundcubemail-plugins-kolab-873516681fde288c7a27743174ed4af39ae38a66.tar.gz
Fix saving objects without recurrence rule (but previously had recurrence)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/libkolab/lib/kolab_format_xcal.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/libkolab/lib/kolab_format_xcal.php b/plugins/libkolab/lib/kolab_format_xcal.php
index e9a28e1..db817ff 100644
--- a/plugins/libkolab/lib/kolab_format_xcal.php
+++ b/plugins/libkolab/lib/kolab_format_xcal.php
@@ -271,8 +271,10 @@ abstract class kolab_format_xcal extends kolab_format
}
// save recurrence rule
+ $rr = new RecurrenceRule;
+ $rr->setFrequency(RecurrenceRule::FreqNone);
+
if ($object['recurrence']) {
- $rr = new RecurrenceRule;
$rr->setFrequency($this->rrule_type_map[$object['recurrence']['FREQ']]);
if ($object['recurrence']['INTERVAL'])
@@ -312,8 +314,6 @@ abstract class kolab_format_xcal extends kolab_format
$rr->setEnd(self::get_datetime($object['recurrence']['UNTIL'], null, true));
if ($rr->isValid()) {
- $this->obj->setRecurrenceRule($rr);
-
// add exception dates (only if recurrence rule is valid)
$exdates = new vectordatetime;
foreach ((array)$object['recurrence']['EXDATE'] as $exdate)
@@ -329,6 +329,8 @@ abstract class kolab_format_xcal extends kolab_format
}
}
+ $this->obj->setRecurrenceRule($rr);
+
// save alarm
$valarms = new vectoralarm;
if ($object['alarms']) {