aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-11-10 20:44:41 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2016-11-10 20:44:41 +0100
commit4b3b562c4f9aaa19fb8b647003484c181bd3d52b (patch)
treeb0e7ea86204a514c08ba20ef28fd4ec65edf1031
parent8cfdcfb40d7181393f13ca85b800de8c768d4404 (diff)
downloadnextcloud-server-4b3b562c4f9aaa19fb8b647003484c181bd3d52b.tar.gz
nextcloud-server-4b3b562c4f9aaa19fb8b647003484c181bd3d52b.zip
Fixes files_drop for sabre 3.2
In the new sabre (3.2) the order of beforeMethod is switched. it used to be that beforeMethod:METHOD was called after beforeMethod. But now it is called before. Since we need the view this was broken. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-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;
}