]> source.dussan.org Git - nextcloud-server.git/commitdiff
Query Application class on publicwebdav 20275/head
authorJulius Härtl <jus@bitgrid.net>
Thu, 2 Apr 2020 15:07:53 +0000 (17:07 +0200)
committerJulius Härtl <jus@bitgrid.net>
Thu, 2 Apr 2020 15:07:53 +0000 (17:07 +0200)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/dav/appinfo/v1/publicwebdav.php

index e7bd867898ece333f2bbf585f193eb6e46718eba..c50bc134131264c96c7e648d2a7a5d6096bab2de 100644 (file)
@@ -65,7 +65,7 @@ $filesDropPlugin = new \OCA\DAV\Files\Sharing\FilesDropPlugin();
 
 $server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, function (\Sabre\DAV\Server $server) use ($authBackend, $linkCheckPlugin, $filesDropPlugin) {
        $isAjax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest');
-       $federatedSharingApp = new \OCA\FederatedFileSharing\AppInfo\Application();
+       $federatedSharingApp = \OC::$server->query(\OCA\FederatedFileSharing\AppInfo\Application::class);
        $federatedShareProvider = $federatedSharingApp->getFederatedShareProvider();
        if ($federatedShareProvider->isOutgoingServer2serverShareEnabled() === false && !$isAjax) {
                // this is what is thrown when trying to access a non-existing share