From 580c3f4ffe9608d2beb56d418c68b3b112420e76 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 10 Nov 2019 12:49:51 +0000 Subject: another bulk of composer updates (cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce) --- vendor/sabre/dav/lib/DAV/Mount/Plugin.php | 48 +++++++++++++++---------------- 1 file changed, 23 insertions(+), 25 deletions(-) (limited to 'vendor/sabre/dav/lib/DAV/Mount/Plugin.php') diff --git a/vendor/sabre/dav/lib/DAV/Mount/Plugin.php b/vendor/sabre/dav/lib/DAV/Mount/Plugin.php index dc923ad85..5eaa4d462 100644 --- a/vendor/sabre/dav/lib/DAV/Mount/Plugin.php +++ b/vendor/sabre/dav/lib/DAV/Mount/Plugin.php @@ -1,5 +1,7 @@ server = $server; $this->server->on('method:GET', [$this, 'httpGet'], 90); - } /** * 'beforeMethod' event handles. This event handles intercepts GET requests ending - * with ?mount + * with ?mount. * - * @param RequestInterface $request + * @param RequestInterface $request * @param ResponseInterface $response + * * @return bool */ - function httpGet(RequestInterface $request, ResponseInterface $response) { - + public function httpGet(RequestInterface $request, ResponseInterface $response) + { $queryParams = $request->getQueryParameters(); - if (!array_key_exists('mount', $queryParams)) return; + if (!array_key_exists('mount', $queryParams)) { + return; + } $currentUri = $request->getAbsoluteUrl(); @@ -59,28 +62,23 @@ class Plugin extends DAV\ServerPlugin { // Returning false to break the event chain return false; - } /** - * Generates the davmount response + * Generates the davmount response. * * @param ResponseInterface $response - * @param string $uri absolute uri - * @return void + * @param string $uri absolute uri */ - function davMount(ResponseInterface $response, $uri) { - + public function davMount(ResponseInterface $response, $uri) + { $response->setStatus(200); $response->setHeader('Content-Type', 'application/davmount+xml'); ob_start(); echo '', "\n"; echo "\n"; - echo " ", htmlspecialchars($uri, ENT_NOQUOTES, 'UTF-8'), "\n"; - echo ""; + echo ' ', htmlspecialchars($uri, ENT_NOQUOTES, 'UTF-8'), "\n"; + echo ''; $response->setBody(ob_get_clean()); - } - - } -- cgit v1.2.3