summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJulien Veyssier <julien-nc@posteo.net>2022-12-06 17:22:53 +0100
committerJulien Veyssier <julien-nc@posteo.net>2022-12-12 14:04:11 +0100
commit2d860d2c39aa897250a2cbe6f50036b037c8e559 (patch)
treea859adce5fae053c91d9ebc81930cb2d9f8e074e /apps
parentda9ffe4efc4512661f697c4c62cd88d59cd7260e (diff)
downloadnextcloud-server-2d860d2c39aa897250a2cbe6f50036b037c8e559.tar.gz
nextcloud-server-2d860d2c39aa897250a2cbe6f50036b037c8e559.zip
use modern event dispatch
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/appinfo/v1/publicwebdav.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/dav/appinfo/v1/publicwebdav.php b/apps/dav/appinfo/v1/publicwebdav.php
index 5acea04b1ea..5a405df1554 100644
--- a/apps/dav/appinfo/v1/publicwebdav.php
+++ b/apps/dav/appinfo/v1/publicwebdav.php
@@ -30,6 +30,8 @@
*
*/
+use OCP\EventDispatcher\IEventDispatcher;
+use OCP\SabrePublicPluginEvent;
use Psr\Log\LoggerInterface;
// load needed apps
@@ -112,8 +114,10 @@ $server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, funct
$server->addPlugin($linkCheckPlugin);
$server->addPlugin($filesDropPlugin);
// allow setup of additional plugins
-$event = new \OCP\SabrePluginEvent($server);
-\OC::$server->getEventDispatcher()->dispatch('OCA\DAV\Connector\Sabre::addPublicPlugin', $event);
+$event = new SabrePublicPluginEvent($server);
+/** @var IEventDispatcher $eventDispatcher */
+$eventDispatcher = \OC::$server->get(IEventDispatcher::class);
+$eventDispatcher->dispatchTyped($event);
// And off we go!
$server->exec();