diff options
author | Joas Schilling <coding@schilljs.com> | 2023-07-11 11:50:07 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-07-17 16:06:15 +0200 |
commit | 72667a667db9eadc0c2b3d2b793192a8dce7983d (patch) | |
tree | f15a032155732b01e41e38bd6a3ffce87d095b37 /apps/dav/appinfo/v1/webdav.php | |
parent | 99aefbd75a0fea6fb722290966452f3647aa5a63 (diff) | |
download | nextcloud-server-72667a667db9eadc0c2b3d2b793192a8dce7983d.tar.gz nextcloud-server-72667a667db9eadc0c2b3d2b793192a8dce7983d.zip |
feat(dav): Emit a typed event to deprecate OCA\DAV\Connector\Sabre::addPlugin
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/dav/appinfo/v1/webdav.php')
-rw-r--r-- | apps/dav/appinfo/v1/webdav.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/dav/appinfo/v1/webdav.php b/apps/dav/appinfo/v1/webdav.php index 8dbe846f3ff..7c6a3fc77a6 100644 --- a/apps/dav/appinfo/v1/webdav.php +++ b/apps/dav/appinfo/v1/webdav.php @@ -39,6 +39,8 @@ ignore_user_abort(true); // Turn off output buffering to prevent memory problems \OC_Util::obEnd(); +$dispatcher = \OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class); + $serverFactory = new \OCA\DAV\Connector\Sabre\ServerFactory( \OC::$server->getConfig(), \OC::$server->get(LoggerInterface::class), @@ -48,7 +50,7 @@ $serverFactory = new \OCA\DAV\Connector\Sabre\ServerFactory( \OC::$server->getTagManager(), \OC::$server->getRequest(), \OC::$server->getPreviewManager(), - \OC::$server->getEventDispatcher(), + $dispatcher, \OC::$server->getL10N('dav') ); @@ -76,10 +78,11 @@ $server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, funct return \OC\Files\Filesystem::getView(); }); -$dispatcher = \OC::$server->getEventDispatcher(); // allow setup of additional plugins $event = new \OCP\SabrePluginEvent($server); $dispatcher->dispatch('OCA\DAV\Connector\Sabre::addPlugin', $event); +$event = new \OCA\DAV\Events\SabrePluginAddEvent($server); +$dispatcher->dispatchTyped($event); // And off we go! $server->exec(); |