From 5c7acf4807aa427cf1391e0a5d044b453c38e619 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 4 May 2017 10:51:39 +0200 Subject: update sabredav to version 3.2.2 --- .../sabre/dav/lib/DAV/Browser/GuessContentType.php | 4 +- .../sabre/dav/lib/DAV/Browser/MapGetToPropFind.php | 2 +- vendor/sabre/dav/lib/DAV/Browser/Plugin.php | 62 ++++++++++++---------- vendor/sabre/dav/lib/DAV/Browser/PropFindAll.php | 2 +- 4 files changed, 37 insertions(+), 33 deletions(-) (limited to 'vendor/sabre/dav/lib/DAV/Browser') diff --git a/vendor/sabre/dav/lib/DAV/Browser/GuessContentType.php b/vendor/sabre/dav/lib/DAV/Browser/GuessContentType.php index 01cddc230..3ba2aee25 100644 --- a/vendor/sabre/dav/lib/DAV/Browser/GuessContentType.php +++ b/vendor/sabre/dav/lib/DAV/Browser/GuessContentType.php @@ -2,10 +2,10 @@ namespace Sabre\DAV\Browser; -use Sabre\HTTP\URLUtil; use Sabre\DAV; -use Sabre\DAV\PropFind; use Sabre\DAV\Inode; +use Sabre\DAV\PropFind; +use Sabre\HTTP\URLUtil; /** * GuessContentType plugin diff --git a/vendor/sabre/dav/lib/DAV/Browser/MapGetToPropFind.php b/vendor/sabre/dav/lib/DAV/Browser/MapGetToPropFind.php index 38ee63bcd..61327c49a 100644 --- a/vendor/sabre/dav/lib/DAV/Browser/MapGetToPropFind.php +++ b/vendor/sabre/dav/lib/DAV/Browser/MapGetToPropFind.php @@ -21,7 +21,7 @@ class MapGetToPropFind extends DAV\ServerPlugin { /** * reference to server class * - * @var Sabre\DAV\Server + * @var DAV\Server */ protected $server; diff --git a/vendor/sabre/dav/lib/DAV/Browser/Plugin.php b/vendor/sabre/dav/lib/DAV/Browser/Plugin.php index 49359a045..545ad5633 100644 --- a/vendor/sabre/dav/lib/DAV/Browser/Plugin.php +++ b/vendor/sabre/dav/lib/DAV/Browser/Plugin.php @@ -4,9 +4,9 @@ namespace Sabre\DAV\Browser; use Sabre\DAV; use Sabre\DAV\MkCol; -use Sabre\HTTP\URLUtil; use Sabre\HTTP\RequestInterface; use Sabre\HTTP\ResponseInterface; +use Sabre\HTTP\URLUtil; /** * Browser Plugin @@ -26,7 +26,7 @@ class Plugin extends DAV\ServerPlugin { /** * reference to server class * - * @var Sabre\DAV\Server + * @var DAV\Server */ protected $server; @@ -112,7 +112,7 @@ class Plugin extends DAV\ServerPlugin { $getVars = $request->getQueryParameters(); // CSP headers - $this->server->httpResponse->setHeader('Content-Security-Policy', "default-src 'none'; img-src 'self'; style-src 'self'; font-src 'self';"); + $response->setHeader('Content-Security-Policy', "default-src 'none'; img-src 'self'; style-src 'self'; font-src 'self';"); $sabreAction = isset($getVars['sabreAction']) ? $getVars['sabreAction'] : null; @@ -317,7 +317,7 @@ class Plugin extends DAV\ServerPlugin { $buttonActions = ''; if ($subProps['subNode'] instanceof DAV\IFile) { - $buttonActions = ''; + $buttonActions = ''; } $this->server->emit('browserButtonActions', [$subProps['fullPath'], $subProps['subNode'], &$buttonActions]); @@ -414,11 +414,14 @@ class Plugin extends DAV\ServerPlugin { * * @param string $title * @param string $path - * @return void + * @return string */ function generateHeader($title, $path = null) { - $version = DAV\Version::VERSION; + $version = ''; + if (DAV\Server::$exposeVersion) { + $version = DAV\Version::VERSION; + } $vars = [ 'title' => $this->escapeHTML($title), @@ -475,7 +478,10 @@ HTML; */ function generateFooter() { - $version = DAV\Version::VERSION; + $version = ''; + if (DAV\Server::$exposeVersion) { + $version = DAV\Version::VERSION; + } return <<Generated by SabreDAV $version (c)2007-2016 http://sabre.io/ @@ -506,23 +512,21 @@ HTML; if (get_class($node) === 'Sabre\\DAV\\SimpleCollection') return; - ob_start(); - echo '
-

Create new folder

- -
- -
-
-

Upload file

- -
-
- -
- '; - - $output .= ob_get_clean(); + $output .= << +

Create new folder

+ +
+ + +
+

Upload file

+ +
+
+ +
+HTML; } @@ -543,8 +547,8 @@ HTML; * This method returns a local pathname to an asset. * * @param string $assetName - * @return string * @throws DAV\Exception\NotFound + * @return string */ protected function getLocalAssetPath($assetName) { @@ -575,9 +579,9 @@ HTML; // Rudimentary mime type detection $mime = 'application/octet-stream'; $map = [ - 'ico' => 'image/vnd.microsoft.icon', - 'png' => 'image/png', - 'css' => 'text/css', + 'ico' => 'image/vnd.microsoft.icon', + 'png' => 'image/png', + 'css' => 'text/css', ]; $ext = substr($assetName, strrpos($assetName, '.') + 1); @@ -623,7 +627,7 @@ HTML; * Maps a resource type to a human-readable string and icon. * * @param array $resourceTypes - * @param INode $node + * @param DAV\INode $node * @return array */ private function mapResourceType(array $resourceTypes, $node) { diff --git a/vendor/sabre/dav/lib/DAV/Browser/PropFindAll.php b/vendor/sabre/dav/lib/DAV/Browser/PropFindAll.php index 1ac439672..c14b7f2f9 100644 --- a/vendor/sabre/dav/lib/DAV/Browser/PropFindAll.php +++ b/vendor/sabre/dav/lib/DAV/Browser/PropFindAll.php @@ -28,7 +28,7 @@ class PropFindAll extends PropFind { /** * Handles a specific property. * - * This method checks wether the specified property was requested in this + * This method checks whether the specified property was requested in this * PROPFIND request, and if so, it will call the callback and use the * return value for it's value. * -- cgit v1.2.3