plugins/libcalendaring

Aleksander Machniak machniak at kolabsys.com
Fri Sep 13 09:48:19 CEST 2013


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

New commits:
commit 7333082dd863c72d792bcc202f636a485c5a2e18
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Fri Sep 13 09:47:40 2013 +0200

    Fix PHP fatal error when Sabre/VObject is not in include path (Bug #2214)

diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php
index 845cfbd..bf7c322 100644
--- a/plugins/libcalendaring/libvcalendar.php
+++ b/plugins/libcalendaring/libvcalendar.php
@@ -23,6 +23,11 @@
 
 use \Sabre\VObject;
 
+// load Sabre\VObject classes
+if (!class_exists('\Sabre\VObject\Reader')) {
+    require_once __DIR__ . '/lib/Sabre/VObject/includes.php';
+}
+
 /**
  * Class to parse and build vCalendar (iCalendar) files
  *
@@ -50,11 +55,6 @@ class libvcalendar
      */
     function __construct($tz = null)
     {
-        // load Sabre\VObject classes
-        if (!class_exists('\Sabre\VObject\Reader')) {
-            require_once(__DIR__ . '/lib/Sabre/VObject/includes.php');
-        }
-
         $this->timezone = $tz;
         $this->prodid = '-//Roundcube//Roundcube libcalendaring ' . RCUBE_VERSION . '//Sabre//Sabre VObject ' . VObject\Version::VERSION . '//EN';
     }
@@ -834,6 +834,7 @@ class libvcalendar
 
 }
 
+
 /**
  * Override Sabre\VObject\Property that quotes commas in the location property
  * because Apple clients treat that property as list.
@@ -880,4 +881,3 @@ class vobject_location_property extends VObject\Property
         return $out;
     }
 }
-




More information about the commits mailing list