Merge pull request #21453 from nextcloud/bugfix/noid/dont-initialize-directly

Don't initialize Application directly
This commit is contained in:
Roeland Jago Douma 2020-06-17 15:40:11 +02:00 committed by GitHub
commit 38cbd17e0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View 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();
}
}