diff options
Diffstat (limited to 'vendor/sabre/dav/lib')
29 files changed, 59 insertions, 36 deletions
diff --git a/vendor/sabre/dav/lib/CalDAV/Backend/BackendInterface.php b/vendor/sabre/dav/lib/CalDAV/Backend/BackendInterface.php index 8bfa7446a..ccaa2519a 100644 --- a/vendor/sabre/dav/lib/CalDAV/Backend/BackendInterface.php +++ b/vendor/sabre/dav/lib/CalDAV/Backend/BackendInterface.php @@ -221,7 +221,7 @@ interface BackendInterface * * This default may well be good enough for personal use, and calendars * that aren't very large. But if you anticipate high usage, big calendars - * or high loads, you are strongly adviced to optimize certain paths. + * or high loads, you are strongly advised to optimize certain paths. * * The best way to do so is override this method and to optimize * specifically for 'common filters'. diff --git a/vendor/sabre/dav/lib/CalDAV/Backend/NotificationSupport.php b/vendor/sabre/dav/lib/CalDAV/Backend/NotificationSupport.php index 6e48d5454..5c04ae44c 100644 --- a/vendor/sabre/dav/lib/CalDAV/Backend/NotificationSupport.php +++ b/vendor/sabre/dav/lib/CalDAV/Backend/NotificationSupport.php @@ -36,7 +36,7 @@ interface NotificationSupport extends BackendInterface public function getNotificationsForPrincipal($principalUri); /** - * This deletes a specific notifcation. + * This deletes a specific notification. * * This may be called by a client once it deems a notification handled. * diff --git a/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php b/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php index b9f112cf8..634b9828c 100644 --- a/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php +++ b/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php @@ -196,7 +196,7 @@ SQL //$stmt2 = $this->pdo->prepare('SELECT principaluri FROM ' . $this->calendarInstancesTableName . ' WHERE access = 1 AND id = ?'); //$stmt2->execute([$row['id']]); - // read-only is for backwards compatbility. Might go away in + // read-only is for backwards compatibility. Might go away in // the future. $calendar['read-only'] = \Sabre\DAV\Sharing\Plugin::ACCESS_READ === (int) $row['access']; } @@ -730,7 +730,7 @@ SQL * * This default may well be good enough for personal use, and calendars * that aren't very large. But if you anticipate high usage, big calendars - * or high loads, you are strongly adviced to optimize certain paths. + * or high loads, you are strongly advised to optimize certain paths. * * The best way to do so is override this method and to optimize * specifically for 'common filters'. diff --git a/vendor/sabre/dav/lib/CalDAV/Calendar.php b/vendor/sabre/dav/lib/CalDAV/Calendar.php index 6c0bf5411..ba8c704a5 100644 --- a/vendor/sabre/dav/lib/CalDAV/Calendar.php +++ b/vendor/sabre/dav/lib/CalDAV/Calendar.php @@ -435,7 +435,7 @@ class Calendar implements ICalendar, DAV\IProperties, DAV\Sync\ISyncCollection, * return null. * * The limit is 'suggestive'. You are free to ignore it. - * TODO: RFC6578 Setion 3.7 says that the server must fail when the server + * TODO: RFC6578 Section 3.7 says that the server must fail when the server * cannot truncate according to the limit, so it may not be just suggestive. * * @param string $syncToken diff --git a/vendor/sabre/dav/lib/CalDAV/Notifications/Node.php b/vendor/sabre/dav/lib/CalDAV/Notifications/Node.php index 7d3a3f46b..5bf9a6018 100644 --- a/vendor/sabre/dav/lib/CalDAV/Notifications/Node.php +++ b/vendor/sabre/dav/lib/CalDAV/Notifications/Node.php @@ -70,7 +70,7 @@ class Node extends DAV\File implements INode, DAVACL\IACL /** * Returns the etag for the notification. * - * The etag must be surrounded by litteral double-quotes. + * The etag must be surrounded by literal double-quotes. * * @return string */ @@ -101,7 +101,7 @@ class Node extends DAV\File implements INode, DAVACL\IACL /** * Returns the owner principal. * - * This must be a url to a principal, or null if there's no owner + * This must be an url to a principal, or null if there's no owner * * @return string|null */ diff --git a/vendor/sabre/dav/lib/CalDAV/Plugin.php b/vendor/sabre/dav/lib/CalDAV/Plugin.php index 98f4f554c..ccb722f85 100644 --- a/vendor/sabre/dav/lib/CalDAV/Plugin.php +++ b/vendor/sabre/dav/lib/CalDAV/Plugin.php @@ -720,7 +720,7 @@ class Plugin extends DAV\ServerPlugin return; } - // We're onyl interested in ICalendarObject nodes that are inside of a + // We're only interested in ICalendarObject nodes that are inside of a // real calendar. This is to avoid triggering validation and scheduling // for non-calendars (such as an inbox). list($parent) = Uri\split($path); @@ -913,7 +913,7 @@ class Plugin extends DAV\ServerPlugin } /** - * This method is triggered whenever a subsystem reqeuests the privileges + * This method is triggered whenever a subsystem requests the privileges * that are supported on a particular node. */ public function getSupportedPrivilegeSet(INode $node, array &$supportedPrivilegeSet) diff --git a/vendor/sabre/dav/lib/CalDAV/Schedule/Plugin.php b/vendor/sabre/dav/lib/CalDAV/Schedule/Plugin.php index 5e5659610..5bca56d47 100644 --- a/vendor/sabre/dav/lib/CalDAV/Schedule/Plugin.php +++ b/vendor/sabre/dav/lib/CalDAV/Schedule/Plugin.php @@ -25,6 +25,7 @@ use Sabre\HTTP\ResponseInterface; use Sabre\VObject; use Sabre\VObject\Component\VCalendar; use Sabre\VObject\ITip; +use Sabre\VObject\ITip\Broker; use Sabre\VObject\ITip\Message; use Sabre\VObject\Reader; @@ -389,7 +390,7 @@ class Plugin extends ServerPlugin $node->getOwner() ); - $broker = new ITip\Broker(); + $broker = $this->createITipBroker(); $messages = $broker->parseEvent(null, $addresses, $node->get()); foreach ($messages as $message) { @@ -500,7 +501,7 @@ class Plugin extends ServerPlugin $isNewNode = true; } - $broker = new ITip\Broker(); + $broker = $this->createITipBroker(); $newObject = $broker->processMessage($iTipMessage, $currentObject); $inbox->createFile($newFileName, $iTipMessage->message->serialize()); @@ -611,7 +612,7 @@ class Plugin extends ServerPlugin */ protected function processICalendarChange($oldObject, VCalendar $newObject, array $addresses, array $ignore = [], &$modified = false) { - $broker = new ITip\Broker(); + $broker = $this->createITipBroker(); $messages = $broker->parseEvent($newObject, $addresses, $oldObject); if ($messages) { @@ -994,4 +995,12 @@ class Plugin extends ServerPlugin 'link' => 'http://sabre.io/dav/scheduling/', ]; } + + /** + * Returns an instance of the iTip\Broker. + */ + protected function createITipBroker(): Broker + { + return new Broker(); + } } diff --git a/vendor/sabre/dav/lib/CalDAV/SharingPlugin.php b/vendor/sabre/dav/lib/CalDAV/SharingPlugin.php index f7dca9be6..bacfe0441 100644 --- a/vendor/sabre/dav/lib/CalDAV/SharingPlugin.php +++ b/vendor/sabre/dav/lib/CalDAV/SharingPlugin.php @@ -136,7 +136,7 @@ class SharingPlugin extends DAV\ServerPlugin } /** - * This method is trigged when a user attempts to update a node's + * This method is triggered when a user attempts to update a node's * properties. * * A previous draft of the sharing spec stated that it was possible to use diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Request/CalendarMultiGetReport.php b/vendor/sabre/dav/lib/CalDAV/Xml/Request/CalendarMultiGetReport.php index 3b3a94b26..4771a2070 100644 --- a/vendor/sabre/dav/lib/CalDAV/Xml/Request/CalendarMultiGetReport.php +++ b/vendor/sabre/dav/lib/CalDAV/Xml/Request/CalendarMultiGetReport.php @@ -48,7 +48,7 @@ class CalendarMultiGetReport implements XmlDeserializable public $expand = null; /** - * The mimetype of the content that should be returend. Usually + * The mimetype of the content that should be returned. Usually * text/calendar. * * @var string diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Request/CalendarQueryReport.php b/vendor/sabre/dav/lib/CalDAV/Xml/Request/CalendarQueryReport.php index b3cc299d3..5a4df4674 100644 --- a/vendor/sabre/dav/lib/CalDAV/Xml/Request/CalendarQueryReport.php +++ b/vendor/sabre/dav/lib/CalDAV/Xml/Request/CalendarQueryReport.php @@ -48,7 +48,7 @@ class CalendarQueryReport implements XmlDeserializable public $expand = null; /** - * The mimetype of the content that should be returend. Usually + * The mimetype of the content that should be returned. Usually * text/calendar. * * @var string diff --git a/vendor/sabre/dav/lib/CardDAV/Backend/BackendInterface.php b/vendor/sabre/dav/lib/CardDAV/Backend/BackendInterface.php index 6ef34d173..f9955ac83 100644 --- a/vendor/sabre/dav/lib/CardDAV/Backend/BackendInterface.php +++ b/vendor/sabre/dav/lib/CardDAV/Backend/BackendInterface.php @@ -88,7 +88,7 @@ interface BackendInterface * * size - The size of the card in bytes. * * If these last two properties are provided, less time will be spent - * calculating them. If they are specified, you can also ommit carddata. + * calculating them. If they are specified, you can also omit carddata. * This may speed up certain requests, especially with large cards. * * @param mixed $addressbookId @@ -98,7 +98,7 @@ interface BackendInterface public function getCards($addressbookId); /** - * Returns a specfic card. + * Returns a specific card. * * The same set of properties must be returned as with getCards. The only * exception is that 'carddata' is absolutely required. diff --git a/vendor/sabre/dav/lib/CardDAV/Backend/PDO.php b/vendor/sabre/dav/lib/CardDAV/Backend/PDO.php index 4ca9284a9..7b935a4ae 100644 --- a/vendor/sabre/dav/lib/CardDAV/Backend/PDO.php +++ b/vendor/sabre/dav/lib/CardDAV/Backend/PDO.php @@ -205,7 +205,7 @@ class PDO extends AbstractBackend implements SyncSupport * * size - The size of the card in bytes. * * If these last two properties are provided, less time will be spent - * calculating them. If they are specified, you can also ommit carddata. + * calculating them. If they are specified, you can also omit carddata. * This may speed up certain requests, especially with large cards. * * @param mixed $addressbookId diff --git a/vendor/sabre/dav/lib/CardDAV/Plugin.php b/vendor/sabre/dav/lib/CardDAV/Plugin.php index c2d31d9df..810ae3a1a 100644 --- a/vendor/sabre/dav/lib/CardDAV/Plugin.php +++ b/vendor/sabre/dav/lib/CardDAV/Plugin.php @@ -800,7 +800,7 @@ class Plugin extends DAV\ServerPlugin * * @return string */ - protected function convertVCard($data, $target, array $propertiesFilter = null) + protected function convertVCard($data, $target, ?array $propertiesFilter = null) { if (is_resource($data)) { $data = stream_get_contents($data); diff --git a/vendor/sabre/dav/lib/CardDAV/Xml/Property/SupportedAddressData.php b/vendor/sabre/dav/lib/CardDAV/Xml/Property/SupportedAddressData.php index fe5f976a0..536c5a19f 100644 --- a/vendor/sabre/dav/lib/CardDAV/Xml/Property/SupportedAddressData.php +++ b/vendor/sabre/dav/lib/CardDAV/Xml/Property/SupportedAddressData.php @@ -34,7 +34,7 @@ class SupportedAddressData implements XmlSerializable /** * Creates the property. */ - public function __construct(array $supportedData = null) + public function __construct(?array $supportedData = null) { if (is_null($supportedData)) { $supportedData = [ diff --git a/vendor/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php b/vendor/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php index e1096fe28..02402f6c7 100644 --- a/vendor/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php +++ b/vendor/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php @@ -82,7 +82,7 @@ class AddressBookQueryReport implements XmlDeserializable public $test; /** - * The mimetype of the content that should be returend. Usually + * The mimetype of the content that should be returned. Usually * text/vcard. * * @var string diff --git a/vendor/sabre/dav/lib/DAV/Auth/Backend/PDOBasicAuth.php b/vendor/sabre/dav/lib/DAV/Auth/Backend/PDOBasicAuth.php index 39324e4db..d142cbfbf 100644 --- a/vendor/sabre/dav/lib/DAV/Auth/Backend/PDOBasicAuth.php +++ b/vendor/sabre/dav/lib/DAV/Auth/Backend/PDOBasicAuth.php @@ -44,7 +44,7 @@ class PDOBasicAuth extends AbstractBasic * Digest prefix: * if the backend you are using for is prefixing * your password hashes set this option to your prefix to - * cut it off before verfiying. + * cut it off before verifying. * * @var string */ diff --git a/vendor/sabre/dav/lib/DAV/Auth/Plugin.php b/vendor/sabre/dav/lib/DAV/Auth/Plugin.php index eb4f27ca6..47fbe205a 100644 --- a/vendor/sabre/dav/lib/DAV/Auth/Plugin.php +++ b/vendor/sabre/dav/lib/DAV/Auth/Plugin.php @@ -58,7 +58,7 @@ class Plugin extends ServerPlugin * * @param Backend\BackendInterface $authBackend */ - public function __construct(Backend\BackendInterface $authBackend = null) + public function __construct(?Backend\BackendInterface $authBackend = null) { if (!is_null($authBackend)) { $this->addBackend($authBackend); diff --git a/vendor/sabre/dav/lib/DAV/Browser/Plugin.php b/vendor/sabre/dav/lib/DAV/Browser/Plugin.php index 89495e5db..a8a6f430e 100644 --- a/vendor/sabre/dav/lib/DAV/Browser/Plugin.php +++ b/vendor/sabre/dav/lib/DAV/Browser/Plugin.php @@ -522,7 +522,7 @@ HTML; /** * This method takes a path/name of an asset and turns it into url - * suiteable for http access. + * suitable for http access. * * @param string $assetName * diff --git a/vendor/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php b/vendor/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php index 37b28ca54..f28d20f41 100644 --- a/vendor/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php +++ b/vendor/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php @@ -9,7 +9,7 @@ use Sabre\DAV; /** * InvalidSyncToken. * - * This exception is emited for the {DAV:}valid-sync-token pre-condition, as + * This exception is emitted for the {DAV:}valid-sync-token pre-condition, as * defined in rfc6578, section 3.2. * * http://tools.ietf.org/html/rfc6578#section-3.2 diff --git a/vendor/sabre/dav/lib/DAV/Exception/Locked.php b/vendor/sabre/dav/lib/DAV/Exception/Locked.php index 28263cf13..24fad7095 100644 --- a/vendor/sabre/dav/lib/DAV/Exception/Locked.php +++ b/vendor/sabre/dav/lib/DAV/Exception/Locked.php @@ -32,7 +32,7 @@ class Locked extends DAV\Exception * * @param DAV\Locks\LockInfo $lock */ - public function __construct(DAV\Locks\LockInfo $lock = null) + public function __construct(?DAV\Locks\LockInfo $lock = null) { parent::__construct(); diff --git a/vendor/sabre/dav/lib/DAV/Exception/TooManyMatches.php b/vendor/sabre/dav/lib/DAV/Exception/TooManyMatches.php index 3f7d2d5fb..ef6f50243 100644 --- a/vendor/sabre/dav/lib/DAV/Exception/TooManyMatches.php +++ b/vendor/sabre/dav/lib/DAV/Exception/TooManyMatches.php @@ -9,7 +9,7 @@ use Sabre\DAV; /** * TooManyMatches. * - * This exception is emited for the {DAV:}number-of-matches-within-limits + * This exception is emitted for the {DAV:}number-of-matches-within-limits * post-condition, as defined in rfc6578, section 3.2. * * http://tools.ietf.org/html/rfc6578#section-3.2 diff --git a/vendor/sabre/dav/lib/DAV/INodeByPath.php b/vendor/sabre/dav/lib/DAV/INodeByPath.php index 4d63a33bd..349ea1053 100644 --- a/vendor/sabre/dav/lib/DAV/INodeByPath.php +++ b/vendor/sabre/dav/lib/DAV/INodeByPath.php @@ -9,7 +9,7 @@ namespace Sabre\DAV; * * This interface adds a tiny bit of functionality to collections. * - * Getting a node that is deep in the tree normally requires going trough each parent node + * Getting a node that is deep in the tree normally requires going through each parent node * which can cause a significant performance overhead. * * Implementing this interface allows solving this overhead by directly jumping to the target node. diff --git a/vendor/sabre/dav/lib/DAV/Server.php b/vendor/sabre/dav/lib/DAV/Server.php index 1f8300d4a..3133e54ad 100644 --- a/vendor/sabre/dav/lib/DAV/Server.php +++ b/vendor/sabre/dav/lib/DAV/Server.php @@ -211,7 +211,7 @@ class Server implements LoggerAwareInterface, EmitterInterface * * @throws Exception */ - public function __construct($treeOrNode = null, HTTP\Sapi $sapi = null) + public function __construct($treeOrNode = null, ?HTTP\Sapi $sapi = null) { if ($treeOrNode instanceof Tree) { $this->tree = $treeOrNode; @@ -882,7 +882,7 @@ class Server implements LoggerAwareInterface, EmitterInterface * * @return \Traversable */ - private function generatePathNodes(PropFind $propFind, array $yieldFirst = null) + private function generatePathNodes(PropFind $propFind, ?array $yieldFirst = null) { if (null !== $yieldFirst) { yield $yieldFirst; @@ -1635,6 +1635,8 @@ class Server implements LoggerAwareInterface, EmitterInterface */ public function generateMultiStatus($fileProperties, $strip404s = false) { + $this->emit('beforeMultiStatus', [&$fileProperties]); + $w = $this->xml->getWriter(); if (self::$streamMultiStatus) { return function () use ($fileProperties, $strip404s, $w) { diff --git a/vendor/sabre/dav/lib/DAV/Sharing/Plugin.php b/vendor/sabre/dav/lib/DAV/Sharing/Plugin.php index e7adbeee6..d766ae0de 100644 --- a/vendor/sabre/dav/lib/DAV/Sharing/Plugin.php +++ b/vendor/sabre/dav/lib/DAV/Sharing/Plugin.php @@ -194,7 +194,7 @@ class Plugin extends ServerPlugin } /** - * This method is triggered whenever a subsystem reqeuests the privileges + * This method is triggered whenever a subsystem requests the privileges * hat are supported on a particular node. * * We need to add a number of privileges for scheduling purposes. diff --git a/vendor/sabre/dav/lib/DAV/Tree.php b/vendor/sabre/dav/lib/DAV/Tree.php index 65b4583ce..1483e1bc5 100644 --- a/vendor/sabre/dav/lib/DAV/Tree.php +++ b/vendor/sabre/dav/lib/DAV/Tree.php @@ -62,9 +62,21 @@ class Tree implements INodeByPath return $this->rootNode; } - $parts = explode('/', $path); $node = $this->rootNode; + // look for any cached parent and collect the parts below the parent + $parts = []; + $remainingPath = $path; + do { + list($remainingPath, $baseName) = Uri\split($remainingPath); + array_unshift($parts, $baseName); + + if (isset($this->cache[$remainingPath])) { + $node = $this->cache[$remainingPath]; + break; + } + } while ('' !== $remainingPath); + while (count($parts)) { if (!($node instanceof ICollection)) { throw new Exception\NotFound('Could not find node at path: '.$path); diff --git a/vendor/sabre/dav/lib/DAV/Version.php b/vendor/sabre/dav/lib/DAV/Version.php index 345c62d7e..e6aee097c 100644 --- a/vendor/sabre/dav/lib/DAV/Version.php +++ b/vendor/sabre/dav/lib/DAV/Version.php @@ -16,5 +16,5 @@ class Version /** * Full version number. */ - public const VERSION = '4.6.0'; + public const VERSION = '4.7.0'; } diff --git a/vendor/sabre/dav/lib/DAVACL/Plugin.php b/vendor/sabre/dav/lib/DAVACL/Plugin.php index 46d680e15..f0497844d 100644 --- a/vendor/sabre/dav/lib/DAVACL/Plugin.php +++ b/vendor/sabre/dav/lib/DAVACL/Plugin.php @@ -716,7 +716,7 @@ class Plugin extends DAV\ServerPlugin * @param array $requestedProperties this is the list of properties to * return for every match * @param string $collectionUri the principal collection to search on. - * If this is ommitted, the standard + * If this is omitted, the standard * principal collection-set will be used * @param string $test "allof" to use AND to search the * properties. 'anyof' for OR. diff --git a/vendor/sabre/dav/lib/DAVACL/PrincipalBackend/PDO.php b/vendor/sabre/dav/lib/DAVACL/PrincipalBackend/PDO.php index 17bc245c5..178bd7276 100644 --- a/vendor/sabre/dav/lib/DAVACL/PrincipalBackend/PDO.php +++ b/vendor/sabre/dav/lib/DAVACL/PrincipalBackend/PDO.php @@ -80,7 +80,7 @@ class PDO extends AbstractBackend implements CreatePrincipalSupport * return any additional properties if you wish so. Common properties are: * {DAV:}displayname * {http://sabredav.org/ns}email-address - This is a custom SabreDAV - * field that's actualy injected in a number of other properties. If + * field that's actually injected in a number of other properties. If * you have an email address, use this property. * * @param string $prefixPath diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Property/Principal.php b/vendor/sabre/dav/lib/DAVACL/Xml/Property/Principal.php index 52092128f..5b9ee4517 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Property/Principal.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Property/Principal.php @@ -149,7 +149,7 @@ class Principal extends DAV\Xml\Property\Href /** * The deserialize method is called during xml parsing. * - * This method is called staticly, this is because in theory this method + * This method is called statically, this is because in theory this method * may be used as a type of constructor, or factory method. * * Often you want to return an instance of the current class, but you are |