diff options
author | Vincent Petry <vincent@nextcloud.com> | 2023-01-05 09:43:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-05 09:43:39 +0100 |
commit | c255735f834d42c4e927ad511a0d3946383be7e4 (patch) | |
tree | 248572f6b11e9894e37782d14aa5c8971f91f540 /apps | |
parent | d9d38a03ff2c8414ca7c1219e7cf9fe24c175897 (diff) | |
parent | fb9dfb67ba1963e12040c107e8404a28904b3791 (diff) | |
download | nextcloud-server-c255735f834d42c4e927ad511a0d3946383be7e4.tar.gz nextcloud-server-c255735f834d42c4e927ad511a0d3946383be7e4.zip |
Merge pull request #35817 from nextcloud/backport/35789/stable25
[stable25] Allow additional Sabre plugins in publicwebdav.php
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/appinfo/v1/publicwebdav.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/dav/appinfo/v1/publicwebdav.php b/apps/dav/appinfo/v1/publicwebdav.php index 409fbbcf4a7..5530fc2cc7d 100644 --- a/apps/dav/appinfo/v1/publicwebdav.php +++ b/apps/dav/appinfo/v1/publicwebdav.php @@ -30,6 +30,8 @@ * */ +use OCP\BeforeSabrePubliclyLoadedEvent; +use OCP\EventDispatcher\IEventDispatcher; use Psr\Log\LoggerInterface; // load needed apps @@ -111,6 +113,11 @@ $server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, funct $server->addPlugin($linkCheckPlugin); $server->addPlugin($filesDropPlugin); +// allow setup of additional plugins +$event = new BeforeSabrePubliclyLoadedEvent($server); +/** @var IEventDispatcher $eventDispatcher */ +$eventDispatcher = \OC::$server->get(IEventDispatcher::class); +$eventDispatcher->dispatchTyped($event); // And off we go! $server->exec(); |