summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-11-11 15:09:50 +0100
committerGitHub <noreply@github.com>2016-11-11 15:09:50 +0100
commitd61c8d74bbba9901c453a5f9be9a4ffa6cce4291 (patch)
treed50b0103767a5d60dbc9f296d39b00d4f70dae5b
parentc53d7d59f7bd35ccf27e8c56e364337fa0416ee7 (diff)
parent4b3b562c4f9aaa19fb8b647003484c181bd3d52b (diff)
downloadnextcloud-server-d61c8d74bbba9901c453a5f9be9a4ffa6cce4291.tar.gz
nextcloud-server-d61c8d74bbba9901c453a5f9be9a4ffa6cce4291.zip
Merge pull request #2082 from nextcloud/files_drop_sabre32
Fixes files_drop for sabre 3.2
-rw-r--r--apps/dav/lib/Files/Sharing/FilesDropPlugin.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/Files/Sharing/FilesDropPlugin.php b/apps/dav/lib/Files/Sharing/FilesDropPlugin.php
index ccfa452cb68..299427b1634 100644
--- a/apps/dav/lib/Files/Sharing/FilesDropPlugin.php
+++ b/apps/dav/lib/Files/Sharing/FilesDropPlugin.php
@@ -58,13 +58,13 @@ class FilesDropPlugin extends ServerPlugin {
* @return void
*/
public function initialize(\Sabre\DAV\Server $server) {
- $server->on('beforeMethod:PUT', [$this, 'beforeMethod']);
+ $server->on('beforeMethod', [$this, 'beforeMethod'], 999);
$this->enabled = false;
}
public function beforeMethod(RequestInterface $request, ResponseInterface $response){
- if (!$this->enabled) {
+ if (!$this->enabled || $request->getMethod() !== 'PUT') {
return;
}