diff options
author | Georg Ehrke <developer@georgehrke.com> | 2020-03-09 18:32:04 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-03-27 14:53:44 +0300 |
commit | 52ba75f6442ad326f5113cd3e89c4024118c4fcf (patch) | |
tree | 6398478fca4613d1faffa3341318fc93eea9a967 | |
parent | 8648ee131a10a48df601346f7e8bdee7a7b40a9d (diff) |
Sabre/DAV 4.0: beforeMethod is now beforeMethod:*
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
-rw-r--r-- | apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/WebcalCaching/Plugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/AppEnabledPlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/LockPlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/MaintenancePlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/ServerFactory.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Files/Sharing/FilesDropPlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Server.php | 2 | ||||
-rw-r--r-- | apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php | 2 | ||||
-rw-r--r-- | remote.php | 2 |
13 files changed, 13 insertions, 13 deletions
diff --git a/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php b/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php index 0702d8fc9ad..e285bbc378c 100644 --- a/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php +++ b/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php @@ -94,7 +94,7 @@ class InvitationResponseServer { )); // wait with registering these until auth is handled and the filesystem is setup - $this->server->on('beforeMethod', function () use ($root) { + $this->server->on('beforeMethod:*', function () use ($root) { // register plugins from apps $pluginManager = new PluginManager( \OC::$server, diff --git a/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php b/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php index cea11de395c..783c73968be 100644 --- a/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php +++ b/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php @@ -83,7 +83,7 @@ class Plugin extends ServerPlugin { */ public function initialize(Server $server) { $this->server = $server; - $server->on('beforeMethod', [$this, 'beforeMethod']); + $server->on('beforeMethod:*', [$this, 'beforeMethod']); } /** diff --git a/apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php b/apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php index de414e3aa2f..79999f968ae 100644 --- a/apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php +++ b/apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php @@ -46,7 +46,7 @@ class AnonymousOptionsPlugin extends ServerPlugin { public function initialize(\Sabre\DAV\Server $server) { $this->server = $server; // before auth - $this->server->on('beforeMethod', [$this, 'handleAnonymousOptions'], 9); + $this->server->on('beforeMethod:*', [$this, 'handleAnonymousOptions'], 9); } /** diff --git a/apps/dav/lib/Connector/Sabre/AppEnabledPlugin.php b/apps/dav/lib/Connector/Sabre/AppEnabledPlugin.php index 947b2960eab..896a6a5518c 100644 --- a/apps/dav/lib/Connector/Sabre/AppEnabledPlugin.php +++ b/apps/dav/lib/Connector/Sabre/AppEnabledPlugin.php @@ -74,7 +74,7 @@ class AppEnabledPlugin extends ServerPlugin { public function initialize(\Sabre\DAV\Server $server) { $this->server = $server; - $this->server->on('beforeMethod', [$this, 'checkAppEnabled'], 30); + $this->server->on('beforeMethod:*', [$this, 'checkAppEnabled'], 30); } /** diff --git a/apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php b/apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php index 6d7a635f1dd..07c7aad0d1e 100644 --- a/apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php +++ b/apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php @@ -53,7 +53,7 @@ class BlockLegacyClientPlugin extends ServerPlugin { */ public function initialize(\Sabre\DAV\Server $server) { $this->server = $server; - $this->server->on('beforeMethod', [$this, 'beforeHandler'], 200); + $this->server->on('beforeMethod:*', [$this, 'beforeHandler'], 200); } /** diff --git a/apps/dav/lib/Connector/Sabre/LockPlugin.php b/apps/dav/lib/Connector/Sabre/LockPlugin.php index 0d5cad6d9a4..077086c40df 100644 --- a/apps/dav/lib/Connector/Sabre/LockPlugin.php +++ b/apps/dav/lib/Connector/Sabre/LockPlugin.php @@ -45,7 +45,7 @@ class LockPlugin extends ServerPlugin { */ public function initialize(\Sabre\DAV\Server $server) { $this->server = $server; - $this->server->on('beforeMethod', [$this, 'getLock'], 50); + $this->server->on('beforeMethod:*', [$this, 'getLock'], 50); $this->server->on('afterMethod', [$this, 'releaseLock'], 50); } diff --git a/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php b/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php index 4076abe59fe..67e57e788b7 100644 --- a/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php +++ b/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php @@ -67,7 +67,7 @@ class MaintenancePlugin extends ServerPlugin { */ public function initialize(\Sabre\DAV\Server $server) { $this->server = $server; - $this->server->on('beforeMethod', [$this, 'checkMaintenanceMode'], 1); + $this->server->on('beforeMethod:*', [$this, 'checkMaintenanceMode'], 1); } /** diff --git a/apps/dav/lib/Connector/Sabre/ServerFactory.php b/apps/dav/lib/Connector/Sabre/ServerFactory.php index 9efd9ba7b56..d26e19c67c7 100644 --- a/apps/dav/lib/Connector/Sabre/ServerFactory.php +++ b/apps/dav/lib/Connector/Sabre/ServerFactory.php @@ -140,7 +140,7 @@ class ServerFactory { } // wait with registering these until auth is handled and the filesystem is setup - $server->on('beforeMethod', function () use ($server, $objectTree, $viewCallBack) { + $server->on('beforeMethod:*', function () use ($server, $objectTree, $viewCallBack) { // ensure the skeleton is copied $userFolder = \OC::$server->getUserFolder(); diff --git a/apps/dav/lib/Files/Sharing/FilesDropPlugin.php b/apps/dav/lib/Files/Sharing/FilesDropPlugin.php index 7a34ef95079..4542d0b52d0 100644 --- a/apps/dav/lib/Files/Sharing/FilesDropPlugin.php +++ b/apps/dav/lib/Files/Sharing/FilesDropPlugin.php @@ -61,7 +61,7 @@ class FilesDropPlugin extends ServerPlugin { * @throws MethodNotAllowed */ public function initialize(\Sabre\DAV\Server $server) { - $server->on('beforeMethod', [$this, 'beforeMethod'], 999); + $server->on('beforeMethod:*', [$this, 'beforeMethod'], 999); $this->enabled = false; } diff --git a/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php b/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php index 84401196b1a..4c45a299027 100644 --- a/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php +++ b/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php @@ -52,7 +52,7 @@ class PublicLinkCheckPlugin extends ServerPlugin { * @return void */ public function initialize(\Sabre\DAV\Server $server) { - $server->on('beforeMethod', [$this, 'beforeMethod']); + $server->on('beforeMethod:*', [$this, 'beforeMethod']); } public function beforeMethod(RequestInterface $request, ResponseInterface $response){ diff --git a/apps/dav/lib/Server.php b/apps/dav/lib/Server.php index 2502d53997a..230e72fd277 100644 --- a/apps/dav/lib/Server.php +++ b/apps/dav/lib/Server.php @@ -217,7 +217,7 @@ class Server { $this->server->addPlugin(new SearchPlugin($lazySearchBackend)); // wait with registering these until auth is handled and the filesystem is setup - $this->server->on('beforeMethod', function () use ($root, $lazySearchBackend) { + $this->server->on('beforeMethod:*', function () use ($root, $lazySearchBackend) { // custom properties plugin must be the last one $userSession = \OC::$server->getUserSession(); $user = $userSession->getUser(); diff --git a/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php b/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php index 77646b2c9d1..82a4515c7e3 100644 --- a/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php +++ b/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php @@ -66,7 +66,7 @@ class FilesDropPluginTest extends TestCase { $this->server->expects($this->once()) ->method('on') ->with( - $this->equalTo('beforeMethod'), + $this->equalTo('beforeMethod:*'), $this->equalTo([$this->plugin, 'beforeMethod']), $this->equalTo(999) ); diff --git a/remote.php b/remote.php index 7d20b4fbdf4..b1777e92f77 100644 --- a/remote.php +++ b/remote.php @@ -58,7 +58,7 @@ function handleException($e) { // we shall not log on RemoteException $server->addPlugin(new ExceptionLoggerPlugin('webdav', \OC::$server->getLogger())); } - $server->on('beforeMethod', function () use ($e) { + $server->on('beforeMethod:*', function () use ($e) { if ($e instanceof RemoteException) { switch ($e->getCode()) { case 503: |