summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2012-10-18 19:28:08 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2012-10-18 19:28:08 (GMT)
commitd783b487f60587845806beb8422654b07c3347e8 (patch)
tree89aac0b12bfe0909cfc2a480237d9795de67988a
parent433a5420a2161686d62cd1cc29a860ee08587678 (diff)
downloadroundcubemail-plugins-kolab-d783b487f60587845806beb8422654b07c3347e8.tar.gz
Fix sequence fix. Man is it already that late?
-rw-r--r--plugins/libkolab/lib/kolab_format_xcal.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/libkolab/lib/kolab_format_xcal.php b/plugins/libkolab/lib/kolab_format_xcal.php
index 7cef840..57f0892 100644
--- a/plugins/libkolab/lib/kolab_format_xcal.php
+++ b/plugins/libkolab/lib/kolab_format_xcal.php
@@ -223,14 +223,12 @@ abstract class kolab_format_xcal extends kolab_format
if (!empty($object['uid']))
$this->obj->setUid($object['uid']);
- else
- $object['sequence'] = -1; // make the first sequence increment being 0
$object['changed'] = new DateTime('now', self::$timezone);
$this->obj->setLastModified(self::get_datetime($object['changed'], new DateTimeZone('UTC')));
- // increment sequence
- $object['sequence'] = $this->obj->sequence()+1;
+ // increment sequence on updates
+ $object['sequence'] = $object['uid'] ? $this->obj->sequence()+1 : 0;
$this->obj->setSequence($object['sequence']);
$this->obj->setSummary($object['title']);