2 commits - plugins/calendar plugins/libkolab

Thomas Brüderli bruederli at kolabsys.com
Tue Oct 22 09:54:45 CEST 2013


 plugins/calendar/calendar_ui.js       |    3 +++
 plugins/libkolab/lib/kolab_format.php |    6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 0adb1c3912c135159959860900f04a8eb4ec2bcd
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Tue Oct 22 09:54:15 2013 +0200

    Fix updating recurring events

diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js
index f659853..84bfaa7 100644
--- a/plugins/calendar/calendar_ui.js
+++ b/plugins/calendar/calendar_ui.js
@@ -2076,6 +2076,9 @@ function rcube_calendar_ui(settings)
         if (existing.length) {
           $.extend(existing[0], event);
           fc.fullCalendar('updateEvent', existing[0]);
+          // remove old recurrence instances
+          if (event.recurrence && !event.recurrence_id)
+            fc.fullCalendar('removeEvents', function(e){ return e._id.indexOf(event._id+'-') == 0; });
         }
         else {
           event.source = source;  // link with source


commit 5caf7915a3d9e01cd5c6ed15388da8e638adca31
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Tue Oct 22 09:51:28 2013 +0200

    Fix saving created/changed dates: always use UTC timezone

diff --git a/plugins/libkolab/lib/kolab_format.php b/plugins/libkolab/lib/kolab_format.php
index 5bcc57a..aa88f69 100644
--- a/plugins/libkolab/lib/kolab_format.php
+++ b/plugins/libkolab/lib/kolab_format.php
@@ -401,13 +401,13 @@ abstract class kolab_format
         // set some automatic values if missing
         if (empty($object['created']) && method_exists($this->obj, 'setCreated')) {
             $cdt = $this->obj->created();
-            $object['created'] = $cdt && $cdt->isValid() ? self::php_datetime($cdt) : new DateTime('now', self::$timezone);
+            $object['created'] = $cdt && $cdt->isValid() ? self::php_datetime($cdt) : new DateTime('now', new DateTimeZone('UTC'));
             if (!$cdt || !$cdt->isValid())
                 $this->obj->setCreated(self::get_datetime($object['created']));
         }
 
-        $object['changed'] = new DateTime('now', self::$timezone);
-        $this->obj->setLastModified(self::get_datetime($object['changed'], new DateTimeZone('UTC')));
+        $object['changed'] = new DateTime('now', new DateTimeZone('UTC'));
+        $this->obj->setLastModified(self::get_datetime($object['changed']));
 
         // Save custom properties of the given object
         if (isset($object['x-custom'])) {




More information about the commits mailing list