]> source.dussan.org Git - nextcloud-server.git/commitdiff
Don't initialize Application directly 21453/head
authorJoas Schilling <coding@schilljs.com>
Wed, 17 Jun 2020 10:18:15 +0000 (12:18 +0200)
committerJoas Schilling <coding@schilljs.com>
Wed, 17 Jun 2020 10:18:15 +0000 (12:18 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/files_sharing/lib/ShareBackend/File.php

index a15391162ff4f94fa588a438db3a950948619055..a0d7e448be467e17e6626ec3b8b9ad4994252e87 100644 (file)
@@ -34,6 +34,7 @@
 
 namespace OCA\Files_Sharing\ShareBackend;
 
+use OCA\FederatedFileSharing\AppInfo\Application;
 use OCA\FederatedFileSharing\FederatedShareProvider;
 
 class File implements \OCP\Share_Backend_File_Dependent {
@@ -54,7 +55,7 @@ class File implements \OCP\Share_Backend_File_Dependent {
                if ($federatedShareProvider) {
                        $this->federatedShareProvider = $federatedShareProvider;
                } else {
-                       $federatedSharingApp = new \OCA\FederatedFileSharing\AppInfo\Application();
+                       $federatedSharingApp = \OC::$server->query(Application::class);
                        $this->federatedShareProvider = $federatedSharingApp->getFederatedShareProvider();
                }
        }