From 0b02a6d123b2014705998c94ddf3d460948d3eac Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 10 May 2016 17:26:44 -0700 Subject: initial sabre upgrade (needs lots of work - to wit: authentication, redo the browser interface, and rework event export/import) --- vendor/sabre/dav/lib/DAV/Exception/BadRequest.php | 30 +++++++++ vendor/sabre/dav/lib/DAV/Exception/Conflict.php | 30 +++++++++ .../dav/lib/DAV/Exception/ConflictingLock.php | 36 +++++++++++ vendor/sabre/dav/lib/DAV/Exception/Forbidden.php | 29 +++++++++ .../dav/lib/DAV/Exception/InsufficientStorage.php | 29 +++++++++ .../dav/lib/DAV/Exception/InvalidResourceType.php | 33 ++++++++++ .../dav/lib/DAV/Exception/InvalidSyncToken.php | 38 ++++++++++++ .../sabre/dav/lib/DAV/Exception/LengthRequired.php | 30 +++++++++ .../DAV/Exception/LockTokenMatchesRequestUri.php | 41 ++++++++++++ vendor/sabre/dav/lib/DAV/Exception/Locked.php | 72 ++++++++++++++++++++++ .../dav/lib/DAV/Exception/MethodNotAllowed.php | 47 ++++++++++++++ .../dav/lib/DAV/Exception/NotAuthenticated.php | 30 +++++++++ vendor/sabre/dav/lib/DAV/Exception/NotFound.php | 29 +++++++++ .../sabre/dav/lib/DAV/Exception/NotImplemented.php | 29 +++++++++ .../dav/lib/DAV/Exception/PaymentRequired.php | 30 +++++++++ .../dav/lib/DAV/Exception/PreconditionFailed.php | 71 +++++++++++++++++++++ .../dav/lib/DAV/Exception/ReportNotSupported.php | 32 ++++++++++ .../DAV/Exception/RequestedRangeNotSatisfiable.php | 30 +++++++++ .../dav/lib/DAV/Exception/ServiceUnavailable.php | 30 +++++++++ .../sabre/dav/lib/DAV/Exception/TooManyMatches.php | 38 ++++++++++++ .../dav/lib/DAV/Exception/UnsupportedMediaType.php | 30 +++++++++ 21 files changed, 764 insertions(+) create mode 100644 vendor/sabre/dav/lib/DAV/Exception/BadRequest.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/Conflict.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/ConflictingLock.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/Forbidden.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/InsufficientStorage.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/InvalidResourceType.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/LengthRequired.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/LockTokenMatchesRequestUri.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/Locked.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/MethodNotAllowed.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/NotAuthenticated.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/NotFound.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/NotImplemented.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/PaymentRequired.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/PreconditionFailed.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/ReportNotSupported.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/RequestedRangeNotSatisfiable.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/ServiceUnavailable.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/TooManyMatches.php create mode 100644 vendor/sabre/dav/lib/DAV/Exception/UnsupportedMediaType.php (limited to 'vendor/sabre/dav/lib/DAV/Exception') diff --git a/vendor/sabre/dav/lib/DAV/Exception/BadRequest.php b/vendor/sabre/dav/lib/DAV/Exception/BadRequest.php new file mode 100644 index 000000000..c21f493da --- /dev/null +++ b/vendor/sabre/dav/lib/DAV/Exception/BadRequest.php @@ -0,0 +1,30 @@ +lock) { + $error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:no-conflicting-lock'); + $errorNode->appendChild($error); + $error->appendChild($errorNode->ownerDocument->createElementNS('DAV:', 'd:href', $this->lock->uri)); + } + + } + +} diff --git a/vendor/sabre/dav/lib/DAV/Exception/Forbidden.php b/vendor/sabre/dav/lib/DAV/Exception/Forbidden.php new file mode 100644 index 000000000..77df7ca9e --- /dev/null +++ b/vendor/sabre/dav/lib/DAV/Exception/Forbidden.php @@ -0,0 +1,29 @@ +ownerDocument->createElementNS('DAV:', 'd:valid-resourcetype'); + $errorNode->appendChild($error); + + } + +} diff --git a/vendor/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php b/vendor/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php new file mode 100644 index 000000000..51a253b29 --- /dev/null +++ b/vendor/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php @@ -0,0 +1,38 @@ +ownerDocument->createElementNS('DAV:', 'd:valid-sync-token'); + $errorNode->appendChild($error); + + } + +} diff --git a/vendor/sabre/dav/lib/DAV/Exception/LengthRequired.php b/vendor/sabre/dav/lib/DAV/Exception/LengthRequired.php new file mode 100644 index 000000000..989718558 --- /dev/null +++ b/vendor/sabre/dav/lib/DAV/Exception/LengthRequired.php @@ -0,0 +1,30 @@ +message = 'The locktoken supplied does not match any locks on this entity'; + + } + + /** + * This method allows the exception to include additional information into the WebDAV error response + * + * @param DAV\Server $server + * @param \DOMElement $errorNode + * @return void + */ + function serialize(DAV\Server $server, \DOMElement $errorNode) { + + $error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:lock-token-matches-request-uri'); + $errorNode->appendChild($error); + + } + +} diff --git a/vendor/sabre/dav/lib/DAV/Exception/Locked.php b/vendor/sabre/dav/lib/DAV/Exception/Locked.php new file mode 100644 index 000000000..8176db46e --- /dev/null +++ b/vendor/sabre/dav/lib/DAV/Exception/Locked.php @@ -0,0 +1,72 @@ +lock = $lock; + + } + + /** + * Returns the HTTP statuscode for this exception + * + * @return int + */ + function getHTTPCode() { + + return 423; + + } + + /** + * This method allows the exception to include additional information into the WebDAV error response + * + * @param DAV\Server $server + * @param \DOMElement $errorNode + * @return void + */ + function serialize(DAV\Server $server, \DOMElement $errorNode) { + + if ($this->lock) { + $error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:lock-token-submitted'); + $errorNode->appendChild($error); + + $href = $errorNode->ownerDocument->createElementNS('DAV:', 'd:href'); + $href->appendChild($errorNode->ownerDocument->createTextNode($this->lock->uri)); + $error->appendChild( + $href + ); + } + + } + +} diff --git a/vendor/sabre/dav/lib/DAV/Exception/MethodNotAllowed.php b/vendor/sabre/dav/lib/DAV/Exception/MethodNotAllowed.php new file mode 100644 index 000000000..30c1c2553 --- /dev/null +++ b/vendor/sabre/dav/lib/DAV/Exception/MethodNotAllowed.php @@ -0,0 +1,47 @@ +getAllowedMethods($server->getRequestUri()); + + return [ + 'Allow' => strtoupper(implode(', ', $methods)), + ]; + + } + +} diff --git a/vendor/sabre/dav/lib/DAV/Exception/NotAuthenticated.php b/vendor/sabre/dav/lib/DAV/Exception/NotAuthenticated.php new file mode 100644 index 000000000..e69a60c75 --- /dev/null +++ b/vendor/sabre/dav/lib/DAV/Exception/NotAuthenticated.php @@ -0,0 +1,30 @@ +header = $header; + + } + + /** + * Returns the HTTP statuscode for this exception + * + * @return int + */ + function getHTTPCode() { + + return 412; + + } + + /** + * This method allows the exception to include additional information into the WebDAV error response + * + * @param DAV\Server $server + * @param \DOMElement $errorNode + * @return void + */ + function serialize(DAV\Server $server, \DOMElement $errorNode) { + + if ($this->header) { + $prop = $errorNode->ownerDocument->createElement('s:header'); + $prop->nodeValue = $this->header; + $errorNode->appendChild($prop); + } + + } + +} diff --git a/vendor/sabre/dav/lib/DAV/Exception/ReportNotSupported.php b/vendor/sabre/dav/lib/DAV/Exception/ReportNotSupported.php new file mode 100644 index 000000000..a83695627 --- /dev/null +++ b/vendor/sabre/dav/lib/DAV/Exception/ReportNotSupported.php @@ -0,0 +1,32 @@ +ownerDocument->createElementNS('DAV:', 'd:supported-report'); + $errorNode->appendChild($error); + + } + +} diff --git a/vendor/sabre/dav/lib/DAV/Exception/RequestedRangeNotSatisfiable.php b/vendor/sabre/dav/lib/DAV/Exception/RequestedRangeNotSatisfiable.php new file mode 100644 index 000000000..c8ccfc062 --- /dev/null +++ b/vendor/sabre/dav/lib/DAV/Exception/RequestedRangeNotSatisfiable.php @@ -0,0 +1,30 @@ + + * @copyright Copyright (C) fruux GmbH (https://fruux.com/) + * @license http://sabre.io/license/ Modified BSD License + */ +class ServiceUnavailable extends DAV\Exception { + + /** + * Returns the HTTP statuscode for this exception + * + * @return int + */ + function getHTTPCode() { + + return 503; + + } + +} diff --git a/vendor/sabre/dav/lib/DAV/Exception/TooManyMatches.php b/vendor/sabre/dav/lib/DAV/Exception/TooManyMatches.php new file mode 100644 index 000000000..d0f0f84e8 --- /dev/null +++ b/vendor/sabre/dav/lib/DAV/Exception/TooManyMatches.php @@ -0,0 +1,38 @@ +ownerDocument->createElementNS('DAV:', 'd:number-of-matches-within-limits'); + $errorNode->appendChild($error); + + } + +} diff --git a/vendor/sabre/dav/lib/DAV/Exception/UnsupportedMediaType.php b/vendor/sabre/dav/lib/DAV/Exception/UnsupportedMediaType.php new file mode 100644 index 000000000..f3d92842d --- /dev/null +++ b/vendor/sabre/dav/lib/DAV/Exception/UnsupportedMediaType.php @@ -0,0 +1,30 @@ +