Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-09-29 16:28:57 +0400
committerRobin Appelman <icewind1991@gmail.com>2011-09-29 16:28:57 +0400
commit2086bc4be77ba64337b721cec1cac544c1c58452 (patch)
tree1ce50e6854664b8e8dcf2b741551cd417de88fdd /3rdparty/Sabre/DAV/Browser/Plugin.php
parentfcc6d61fe195e090da33f213312d3d8bec8c1c71 (diff)
update sabredav to 1.5.3
Diffstat (limited to '3rdparty/Sabre/DAV/Browser/Plugin.php')
-rw-r--r--3rdparty/Sabre/DAV/Browser/Plugin.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/3rdparty/Sabre/DAV/Browser/Plugin.php b/3rdparty/Sabre/DAV/Browser/Plugin.php
index 8e0ca24cff2..cd5617babb1 100644
--- a/3rdparty/Sabre/DAV/Browser/Plugin.php
+++ b/3rdparty/Sabre/DAV/Browser/Plugin.php
@@ -68,9 +68,16 @@ class Sabre_DAV_Browser_Plugin extends Sabre_DAV_ServerPlugin {
public function httpGetInterceptor($method, $uri) {
if ($method!='GET') return true;
-
- $node = $this->server->tree->getNodeForPath($uri);
- if ($node instanceof Sabre_DAV_IFile) return true;
+
+ try {
+ $node = $this->server->tree->getNodeForPath($uri);
+ } catch (Sabre_DAV_Exception_FileNotFound $e) {
+ // We're simply stopping when the file isn't found to not interfere
+ // with other plugins.
+ return;
+ }
+ if ($node instanceof Sabre_DAV_IFile)
+ return;
$this->server->httpResponse->sendStatus(200);
$this->server->httpResponse->setHeader('Content-Type','text/html; charset=utf-8');
@@ -165,6 +172,8 @@ class Sabre_DAV_Browser_Plugin extends Sabre_DAV_ServerPlugin {
'{DAV:}getlastmodified',
),1);
+ $parent = $this->server->tree->getNodeForPath($path);
+
if ($path) {
@@ -189,6 +198,7 @@ class Sabre_DAV_Browser_Plugin extends Sabre_DAV_ServerPlugin {
$type = null;
+
if (isset($file[200]['{DAV:}resourcetype'])) {
$type = $file[200]['{DAV:}resourcetype']->getValue();
@@ -246,7 +256,7 @@ class Sabre_DAV_Browser_Plugin extends Sabre_DAV_ServerPlugin {
$html.= "<tr><td colspan=\"4\"><hr /></td></tr>";
- if ($this->enablePost) {
+ if ($this->enablePost && $parent instanceof Sabre_DAV_ICollection) {
$html.= '<tr><td><form method="post" action="">
<h3>Create new folder</h3>
<input type="hidden" name="sabreAction" value="mkcol" />