3 commits - plugins/calendar plugins/libcalendaring

Thomas Brüderli bruederli at kolabsys.com
Thu Sep 12 10:04:37 CEST 2013


 plugins/calendar/calendar.php           |    2 +-
 plugins/libcalendaring/libvcalendar.php |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 348f39a8805a933161ed398cc7b8794979615148
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Thu Sep 12 10:01:56 2013 +0200

    Fix exporting of all-day events (#2208); The custom _dateonly flag doesn't survive serialization in kolab_cache

diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php
index 6de8feb..cabbb65 100644
--- a/plugins/libcalendaring/libvcalendar.php
+++ b/plugins/libcalendaring/libvcalendar.php
@@ -543,10 +543,10 @@ class libvcalendar
      * @param string Property name
      * @param object DateTime
      */
-    public static function datetime_prop($name, $dt, $utc = false)
+    public static function datetime_prop($name, $dt, $utc = false, $dateonly = null)
     {
         $vdt = new VObject\Property\DateTime($name);
-        $vdt->setDateTime($dt, $dt->_dateonly ? VObject\Property\DateTime::DATE :
+        $vdt->setDateTime($dt, $dt->_dateonly || $dateonly ? VObject\Property\DateTime::DATE :
             ($utc ? VObject\Property\DateTime::UTC : VObject\Property\DateTime::LOCALTZ));
         return $vdt;
     }
@@ -645,9 +645,9 @@ class libvcalendar
         if (!empty($event['changed']))
             $ve->add(self::datetime_prop('DTSTAMP', $event['changed'], true));
         if (!empty($event['start']))
-            $ve->add(self::datetime_prop('DTSTART', $event['start'], false));
+            $ve->add(self::datetime_prop('DTSTART', $event['start'], false, $event['allday']));
         if (!empty($event['end']))
-            $ve->add(self::datetime_prop('DTEND',   $event['end'], false));
+            $ve->add(self::datetime_prop('DTEND',   $event['end'], false, $event['allday']));
         if (!empty($event['due']))
             $ve->add(self::datetime_prop('DUE',   $event['due'], false));
 


commit ea56bf9c1b97e8d0ea8ef626d9715f3905647deb
Merge: f08169e 6100361
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Thu Sep 12 09:59:22 2013 +0200

    Merge branch 'master' of ssh://git.kolab.org/git/roundcubemail-plugins-kolab



commit f08169e5232639ee225de3980eaf8d5ea5f6ebc8
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Wed Sep 11 10:00:48 2013 +0200

    Avoid warnings when event['recurrence'] is a string

diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php
index 3b8728a..4dec708 100644
--- a/plugins/calendar/calendar.php
+++ b/plugins/calendar/calendar.php
@@ -1369,7 +1369,7 @@ class calendar extends rcube_plugin
       return;
     }
 
-    if ($event['recurrence']['UNTIL'])
+    if (is_array($event['recurrence']) && !empty($event['recurrence']['UNTIL']))
       $event['recurrence']['UNTIL'] = new DateTime($event['recurrence']['UNTIL'], $this->timezone);
 
     $attachments = array();




More information about the commits mailing list