From dcc65bbacb81801b5e138795c18ef9e740dbd26c Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 28 Jun 2016 21:45:14 +0200 Subject: update to sabre/dav to version 3.2.0 --- vendor/sabre/dav/lib/CalDAV/Backend/PDO.php | 2 +- .../CalDAV/Xml/Property/ScheduleCalendarTransp.php | 22 ++++++---------------- vendor/sabre/dav/lib/DAV/Auth/Backend/File.php | 2 +- vendor/sabre/dav/lib/DAV/FSExt/Directory.php | 10 +--------- vendor/sabre/dav/lib/DAV/Version.php | 2 +- .../sabre/dav/lib/DAV/Xml/Property/ShareAccess.php | 2 +- .../lib/DAV/Xml/Property/SupportedMethodSet.php | 11 +++-------- vendor/sabre/dav/lib/DAVACL/Plugin.php | 5 ----- 8 files changed, 14 insertions(+), 42 deletions(-) (limited to 'vendor/sabre/dav/lib') diff --git a/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php b/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php index b1c013d62..95f1d49a6 100644 --- a/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php +++ b/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php @@ -1502,7 +1502,7 @@ SQL; */ function setPublishStatus($calendarId, $value) { - throw new \Exception('Not implemented'); + throw new \Sabre\DAV\Exception\NotImplemented('Not implemented'); } diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php b/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php index 4a253e008..a82b8eff7 100644 --- a/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php +++ b/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php @@ -4,8 +4,8 @@ namespace Sabre\CalDAV\Xml\Property; use Sabre\Xml\Element; use Sabre\Xml\Reader; +use Sabre\Xml\Deserializer; use Sabre\Xml\Writer; -use Sabre\Xml\Element\Elements; use Sabre\CalDAV\Plugin; /** @@ -116,23 +116,13 @@ class ScheduleCalendarTransp implements Element { */ static function xmlDeserialize(Reader $reader) { - $elems = Elements::xmlDeserialize($reader); + $elems = Deserializer\enum($reader, Plugin::NS_CALDAV); - $value = null; - - foreach ($elems as $elem) { - switch ($elem) { - case '{' . Plugin::NS_CALDAV . '}opaque' : - $value = self::OPAQUE; - break; - case '{' . Plugin::NS_CALDAV . '}transparent' : - $value = self::TRANSPARENT; - break; - } + if (in_array('transparent', $elems)) { + $value = self::TRANSPARENT; + } else { + $value = self::OPAQUE; } - if (is_null($value)) - return null; - return new self($value); } diff --git a/vendor/sabre/dav/lib/DAV/Auth/Backend/File.php b/vendor/sabre/dav/lib/DAV/Auth/Backend/File.php index 6756e68df..3a687d747 100644 --- a/vendor/sabre/dav/lib/DAV/Auth/Backend/File.php +++ b/vendor/sabre/dav/lib/DAV/Auth/Backend/File.php @@ -25,7 +25,7 @@ class File extends AbstractDigest { /** * Creates the backend object. * - * If the filename argument is passed in, it will parse out the specified file fist. + * If the filename argument is passed in, it will parse out the specified file first. * * @param string|null $filename */ diff --git a/vendor/sabre/dav/lib/DAV/FSExt/Directory.php b/vendor/sabre/dav/lib/DAV/FSExt/Directory.php index 648079e26..dd5f992db 100644 --- a/vendor/sabre/dav/lib/DAV/FSExt/Directory.php +++ b/vendor/sabre/dav/lib/DAV/FSExt/Directory.php @@ -131,12 +131,7 @@ class Directory extends Node implements DAV\ICollection, DAV\IQuota, DAV\IMoveTa foreach ($iterator as $entry) { - $node = $entry->getFilename(); - - if ($node === '.sabredav') - continue; - - $nodes[] = $this->getChild($node); + $nodes[] = $this->getChild($entry->getFilename()); } return $nodes; @@ -153,9 +148,6 @@ class Directory extends Node implements DAV\ICollection, DAV\IQuota, DAV\IMoveTa // Deleting all children foreach ($this->getChildren() as $child) $child->delete(); - // Removing resource info, if its still around - if (file_exists($this->path . '/.sabredav')) unlink($this->path . '/.sabredav'); - // Removing the directory itself rmdir($this->path); diff --git a/vendor/sabre/dav/lib/DAV/Version.php b/vendor/sabre/dav/lib/DAV/Version.php index 5430b967c..2fda85db8 100644 --- a/vendor/sabre/dav/lib/DAV/Version.php +++ b/vendor/sabre/dav/lib/DAV/Version.php @@ -14,6 +14,6 @@ class Version { /** * Full version number */ - const VERSION = '3.2.0-beta1'; + const VERSION = '3.2.0'; } diff --git a/vendor/sabre/dav/lib/DAV/Xml/Property/ShareAccess.php b/vendor/sabre/dav/lib/DAV/Xml/Property/ShareAccess.php index f27af5415..a3fc6b0e1 100644 --- a/vendor/sabre/dav/lib/DAV/Xml/Property/ShareAccess.php +++ b/vendor/sabre/dav/lib/DAV/Xml/Property/ShareAccess.php @@ -127,7 +127,7 @@ class ShareAccess implements Element { switch ($elem['name']) { case '{DAV:}not-shared' : return new self(SharingPlugin::ACCESS_NOTSHARED); - case '{DAV:}sharedowner' : + case '{DAV:}shared-owner' : return new self(SharingPlugin::ACCESS_SHAREDOWNER); case '{DAV:}read' : return new self(SharingPlugin::ACCESS_READ); diff --git a/vendor/sabre/dav/lib/DAV/Xml/Property/SupportedMethodSet.php b/vendor/sabre/dav/lib/DAV/Xml/Property/SupportedMethodSet.php index 56b418db6..7641f3739 100644 --- a/vendor/sabre/dav/lib/DAV/Xml/Property/SupportedMethodSet.php +++ b/vendor/sabre/dav/lib/DAV/Xml/Property/SupportedMethodSet.php @@ -32,16 +32,11 @@ class SupportedMethodSet implements XmlSerializable, HtmlOutput { /** * Creates the property * - * Any reports passed in the constructor - * should be valid report-types in clark-notation. - * - * Either a string or an array of strings must be passed. - * - * @param string|string[] $methods + * @param string[] $methods */ - function __construct($methods = null) { + function __construct(array $methods) { - $this->methods = (array)$methods; + $this->methods = $methods; } diff --git a/vendor/sabre/dav/lib/DAVACL/Plugin.php b/vendor/sabre/dav/lib/DAVACL/Plugin.php index 59a7b0922..8e912309e 100644 --- a/vendor/sabre/dav/lib/DAVACL/Plugin.php +++ b/vendor/sabre/dav/lib/DAVACL/Plugin.php @@ -307,11 +307,6 @@ class Plugin extends DAV\ServerPlugin { 'protected' => true, 'privilege' => '{DAV:}all', ], - [ - 'principal' => '{DAV:}unauthenticated', - 'protected' => true, - 'privilege' => '{DAV:}read', - ], ]; /** -- cgit v1.2.3