aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/DAV/Browser
diff options
context:
space:
mode:
authorzotlabs <root@sillystring.adeis.uow.edu.au>2017-03-16 11:42:06 +1100
committerzotlabs <root@sillystring.adeis.uow.edu.au>2017-03-16 11:42:06 +1100
commit8d4744d115036dd7ec4169f8b1fdebebac6fb602 (patch)
treeaa8c18d6c51256fb94048dccf0c822b0281ad894 /vendor/sabre/dav/lib/DAV/Browser
parentdf6c07aaadda2e89d2843bae136f813c909637ba (diff)
downloadvolse-hubzilla-8d4744d115036dd7ec4169f8b1fdebebac6fb602.tar.gz
volse-hubzilla-8d4744d115036dd7ec4169f8b1fdebebac6fb602.tar.bz2
volse-hubzilla-8d4744d115036dd7ec4169f8b1fdebebac6fb602.zip
new composer.lock for red
Diffstat (limited to 'vendor/sabre/dav/lib/DAV/Browser')
-rw-r--r--vendor/sabre/dav/lib/DAV/Browser/GuessContentType.php4
-rw-r--r--vendor/sabre/dav/lib/DAV/Browser/MapGetToPropFind.php2
-rw-r--r--vendor/sabre/dav/lib/DAV/Browser/Plugin.php62
-rw-r--r--vendor/sabre/dav/lib/DAV/Browser/PropFindAll.php2
4 files changed, 37 insertions, 33 deletions
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 = '<a href="' . $this->escapeHTML($subProps['fullPath']) . '?sabreAction=info"><span class="oi" data-glyph="info"></span></a>';
+ $buttonActions = '<a href="' . $this->escapeHTML($subProps['fullPath']) . '?sabreAction=info"><span class="oi" data-glyph="info"></span></a>';
}
$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 <<<HTML
<footer>Generated by SabreDAV $version (c)2007-2016 <a href="http://sabre.io/">http://sabre.io/</a></footer>
</body>
@@ -506,23 +512,21 @@ HTML;
if (get_class($node) === 'Sabre\\DAV\\SimpleCollection')
return;
- ob_start();
- echo '<form method="post" action="">
- <h3>Create new folder</h3>
- <input type="hidden" name="sabreAction" value="mkcol" />
- <label>Name:</label> <input type="text" name="name" /><br />
- <input type="submit" value="create" />
- </form>
- <form method="post" action="" enctype="multipart/form-data">
- <h3>Upload file</h3>
- <input type="hidden" name="sabreAction" value="put" />
- <label>Name (optional):</label> <input type="text" name="name" /><br />
- <label>File:</label> <input type="file" name="file" /><br />
- <input type="submit" value="upload" />
- </form>
- ';
-
- $output .= ob_get_clean();
+ $output .= <<<HTML
+<form method="post" action="">
+<h3>Create new folder</h3>
+<input type="hidden" name="sabreAction" value="mkcol" />
+<label>Name:</label> <input type="text" name="name" /><br />
+<input type="submit" value="create" />
+</form>
+<form method="post" action="" enctype="multipart/form-data">
+<h3>Upload file</h3>
+<input type="hidden" name="sabreAction" value="put" />
+<label>Name (optional):</label> <input type="text" name="name" /><br />
+<label>File:</label> <input type="file" name="file" /><br />
+<input type="submit" value="upload" />
+</form>
+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.
*