diff options
Diffstat (limited to '3rdparty/Sabre/CalDAV')
-rw-r--r-- | 3rdparty/Sabre/CalDAV/Backend/Abstract.php | 15 | ||||
-rw-r--r-- | 3rdparty/Sabre/CalDAV/Backend/PDO.php | 17 | ||||
-rw-r--r-- | 3rdparty/Sabre/CalDAV/Calendar.php | 4 | ||||
-rw-r--r-- | 3rdparty/Sabre/CalDAV/CalendarObject.php | 5 | ||||
-rw-r--r-- | 3rdparty/Sabre/CalDAV/ICalendar.php | 18 | ||||
-rw-r--r-- | 3rdparty/Sabre/CalDAV/ICalendarObject.php | 20 | ||||
-rw-r--r-- | 3rdparty/Sabre/CalDAV/Plugin.php | 6 | ||||
-rw-r--r-- | 3rdparty/Sabre/CalDAV/Version.php | 2 |
8 files changed, 63 insertions, 24 deletions
diff --git a/3rdparty/Sabre/CalDAV/Backend/Abstract.php b/3rdparty/Sabre/CalDAV/Backend/Abstract.php index 7ac282f44a0..b694eef49e4 100644 --- a/3rdparty/Sabre/CalDAV/Backend/Abstract.php +++ b/3rdparty/Sabre/CalDAV/Backend/Abstract.php @@ -36,20 +36,17 @@ abstract class Sabre_CalDAV_Backend_Abstract { * If the creation was a success, an id must be returned that can be used to reference * this calendar in other methods, such as updateCalendar. * - * This function must return a server-wide unique id that can be used - * later to reference the calendar. - * * @param string $principalUri * @param string $calendarUri * @param array $properties - * @return string|int + * @return void */ abstract function createCalendar($principalUri,$calendarUri,array $properties); /** - * Updates properties on this node, + * Updates properties for a calendar. * - * The properties array uses the propertyName in clark-notation as key, + * The mutations array uses the propertyName in clark-notation as key, * and the array value for the property value. In the case a property * should be deleted, the property value will be null. * @@ -79,10 +76,10 @@ abstract class Sabre_CalDAV_Backend_Abstract { * (424 Failed Dependency) because the request needs to be atomic. * * @param string $calendarId - * @param array $properties + * @param array $mutations * @return bool|array */ - public function updateCalendar($calendarId, array $properties) { + public function updateCalendar($calendarId, array $mutations) { return false; @@ -97,7 +94,7 @@ abstract class Sabre_CalDAV_Backend_Abstract { abstract function deleteCalendar($calendarId); /** - * Returns all calendar objects within a calendar object. + * Returns all calendar objects within a calendar. * * Every item contains an array with the following keys: * * id - unique identifier which will be used for subsequent updates diff --git a/3rdparty/Sabre/CalDAV/Backend/PDO.php b/3rdparty/Sabre/CalDAV/Backend/PDO.php index d1785bb8f8f..7b1b33b912e 100644 --- a/3rdparty/Sabre/CalDAV/Backend/PDO.php +++ b/3rdparty/Sabre/CalDAV/Backend/PDO.php @@ -129,7 +129,6 @@ class Sabre_CalDAV_Backend_PDO extends Sabre_CalDAV_Backend_Abstract { * @param string $principalUri * @param string $calendarUri * @param array $properties - * @return mixed */ public function createCalendar($principalUri,$calendarUri, array $properties) { @@ -173,9 +172,9 @@ class Sabre_CalDAV_Backend_PDO extends Sabre_CalDAV_Backend_Abstract { } /** - * Updates a calendars properties + * Updates properties for a calendar. * - * The properties array uses the propertyName in clark-notation as key, + * The mutations array uses the propertyName in clark-notation as key, * and the array value for the property value. In the case a property * should be deleted, the property value will be null. * @@ -205,10 +204,10 @@ class Sabre_CalDAV_Backend_PDO extends Sabre_CalDAV_Backend_Abstract { * (424 Failed Dependency) because the request needs to be atomic. * * @param string $calendarId - * @param array $properties + * @param array $mutations * @return bool|array */ - public function updateCalendar($calendarId, array $properties) { + public function updateCalendar($calendarId, array $mutations) { $newValues = array(); $result = array( @@ -219,13 +218,13 @@ class Sabre_CalDAV_Backend_PDO extends Sabre_CalDAV_Backend_Abstract { $hasError = false; - foreach($properties as $propertyName=>$propertyValue) { + foreach($mutations as $propertyName=>$propertyValue) { // We don't know about this property. if (!isset($this->propertyMap[$propertyName])) { $hasError = true; $result[403][$propertyName] = null; - unset($properties[$propertyName]); + unset($mutations[$propertyName]); continue; } @@ -237,7 +236,7 @@ class Sabre_CalDAV_Backend_PDO extends Sabre_CalDAV_Backend_Abstract { // If there were any errors we need to fail the request if ($hasError) { // Properties has the remaining properties - foreach($properties as $propertyName=>$propertyValue) { + foreach($mutations as $propertyName=>$propertyValue) { $result[424][$propertyName] = null; } @@ -284,7 +283,7 @@ class Sabre_CalDAV_Backend_PDO extends Sabre_CalDAV_Backend_Abstract { } /** - * Returns all calendar objects within a calendar object. + * Returns all calendar objects within a calendar. * * Every item contains an array with the following keys: * * id - unique identifier which will be used for subsequent updates diff --git a/3rdparty/Sabre/CalDAV/Calendar.php b/3rdparty/Sabre/CalDAV/Calendar.php index a50aef12b4f..0d2b3875771 100644 --- a/3rdparty/Sabre/CalDAV/Calendar.php +++ b/3rdparty/Sabre/CalDAV/Calendar.php @@ -12,7 +12,7 @@ * @author Evert Pot (http://www.rooftopsolutions.nl/) * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License */ -class Sabre_CalDAV_Calendar implements Sabre_DAV_ICollection, Sabre_DAV_IProperties, Sabre_DAVACL_IACL { +class Sabre_CalDAV_Calendar implements Sabre_CalDAV_ICalendar, Sabre_DAV_IProperties, Sabre_DAVACL_IACL { /** * This is an array with calendar information @@ -178,6 +178,8 @@ class Sabre_CalDAV_Calendar implements Sabre_DAV_ICollection, Sabre_DAV_IPropert public function createFile($name,$calendarData = null) { $calendarData = stream_get_contents($calendarData); + // Converting to UTF-8, if needed + $calendarData = Sabre_DAV_StringUtil::ensureUTF8($calendarData); $supportedComponents = $this->calendarInfo['{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}supported-calendar-component-set']; if ($supportedComponents) { diff --git a/3rdparty/Sabre/CalDAV/CalendarObject.php b/3rdparty/Sabre/CalDAV/CalendarObject.php index b5c4e49b838..0c99f18deb7 100644 --- a/3rdparty/Sabre/CalDAV/CalendarObject.php +++ b/3rdparty/Sabre/CalDAV/CalendarObject.php @@ -9,7 +9,7 @@ * @author Evert Pot (http://www.rooftopsolutions.nl/) * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License */ -class Sabre_CalDAV_CalendarObject extends Sabre_DAV_File implements Sabre_DAVACL_IACL { +class Sabre_CalDAV_CalendarObject extends Sabre_DAV_File implements Sabre_CalDAV_ICalendarObject, Sabre_DAVACL_IACL { /** * Sabre_CalDAV_Backend_Abstract @@ -93,6 +93,9 @@ class Sabre_CalDAV_CalendarObject extends Sabre_DAV_File implements Sabre_DAVACL if (is_resource($calendarData)) $calendarData = stream_get_contents($calendarData); + // Converting to UTF-8, if needed + $calendarData = Sabre_DAV_StringUtil::ensureUTF8($calendarData); + $supportedComponents = $this->calendarInfo['{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}supported-calendar-component-set']; if ($supportedComponents) { $supportedComponents = $supportedComponents->getValue(); diff --git a/3rdparty/Sabre/CalDAV/ICalendar.php b/3rdparty/Sabre/CalDAV/ICalendar.php new file mode 100644 index 00000000000..8193dff3a83 --- /dev/null +++ b/3rdparty/Sabre/CalDAV/ICalendar.php @@ -0,0 +1,18 @@ +<?php + +/** + * Calendar interface + * + * Implement this interface to allow a node to be recognized as an calendar. + * + * @package Sabre + * @subpackage CalDAV + * @copyright Copyright (C) 2007-2011 Rooftop Solutions. All rights reserved. + * @author Evert Pot (http://www.rooftopsolutions.nl/) + * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License + */ +interface Sabre_CalDAV_ICalendar extends Sabre_DAV_ICollection { + + + +} diff --git a/3rdparty/Sabre/CalDAV/ICalendarObject.php b/3rdparty/Sabre/CalDAV/ICalendarObject.php new file mode 100644 index 00000000000..708300ad7bd --- /dev/null +++ b/3rdparty/Sabre/CalDAV/ICalendarObject.php @@ -0,0 +1,20 @@ +<?php + +/** + * CalendarObject interface +/** + * Extend the ICalendarObject interface to allow your custom nodes to be picked up as + * CalendarObjects. + * + * Calendar objects are resources such as Events, Todo's or Journals. + * + * @package Sabre + * @subpackage CalDAV + * @copyright Copyright (C) 2007-2011 Rooftop Solutions. All rights reserved. + * @author Evert Pot (http://www.rooftopsolutions.nl/) + * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License + */ +interface Sabre_CalDAV_ICalendarObject extends Sabre_DAV_IFile { + +} + diff --git a/3rdparty/Sabre/CalDAV/Plugin.php b/3rdparty/Sabre/CalDAV/Plugin.php index 640595e74ba..02747c8395e 100644 --- a/3rdparty/Sabre/CalDAV/Plugin.php +++ b/3rdparty/Sabre/CalDAV/Plugin.php @@ -114,7 +114,7 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin { public function getSupportedReportSet($uri) { $node = $this->server->tree->getNodeForPath($uri); - if ($node instanceof Sabre_CalDAV_Calendar || $node instanceof Sabre_CalDAV_CalendarObject) { + if ($node instanceof Sabre_CalDAV_ICalendar || $node instanceof Sabre_CalDAV_ICalendarObject) { return array( '{' . self::NS_CALDAV . '}calendar-multiget', '{' . self::NS_CALDAV . '}calendar-query', @@ -143,7 +143,7 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin { $server->propertyMap['{' . self::NS_CALDAV . '}supported-calendar-component-set'] = 'Sabre_CalDAV_Property_SupportedCalendarComponentSet'; - $server->resourceTypeMapping['Sabre_CalDAV_Calendar'] = '{urn:ietf:params:xml:ns:caldav}calendar'; + $server->resourceTypeMapping['Sabre_CalDAV_ICalendar'] = '{urn:ietf:params:xml:ns:caldav}calendar'; $server->resourceTypeMapping['Sabre_CalDAV_Principal_ProxyRead'] = '{http://calendarserver.org/ns/}calendar-proxy-read'; $server->resourceTypeMapping['Sabre_CalDAV_Principal_ProxyWrite'] = '{http://calendarserver.org/ns/}calendar-proxy-write'; @@ -326,7 +326,7 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin { } // instanceof IPrincipal - if ($node instanceof Sabre_CalDAV_CalendarObject) { + if ($node instanceof Sabre_CalDAV_ICalendarObject) { // The calendar-data property is not supposed to be a 'real' // property, but in large chunks of the spec it does act as such. // Therefore we simply expose it as a property. diff --git a/3rdparty/Sabre/CalDAV/Version.php b/3rdparty/Sabre/CalDAV/Version.php index 5ecc0cebb37..df8fe1f6bd6 100644 --- a/3rdparty/Sabre/CalDAV/Version.php +++ b/3rdparty/Sabre/CalDAV/Version.php @@ -14,7 +14,7 @@ class Sabre_CalDAV_Version { /** * Full version number */ - const VERSION = '1.5.0'; + const VERSION = '1.5.3'; /** * Stability : alpha, beta, stable |