Branch 'roundcubemail-plugins-kolab-3.1' - plugins/libcalendaring

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


 plugins/libcalendaring/libvcalendar.php |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit dc7d0857d1f75c1644296dd2d59892559b80c371
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));
 




More information about the commits mailing list