diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-05-12 17:08:54 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-08-01 09:46:40 +0200 |
commit | 458c2fa2971e6595a18a289b0afeb4a79ea0e0d3 (patch) | |
tree | c0bebce50e7d6956045df53f1e51dc44b0ab6c9e /apps/federatedfilesharing/lib | |
parent | 952acd4d276b3190d23e0597c5e01b1dfc4d72bc (diff) | |
download | nextcloud-server-458c2fa2971e6595a18a289b0afeb4a79ea0e0d3.tar.gz nextcloud-server-458c2fa2971e6595a18a289b0afeb4a79ea0e0d3.zip |
Remove OCP\App and OCP\BackgroundJob
Both deprecated since NC 23
IAppManager is the replacement for OCP\App unfortunately it can't be
dependency injected in classes used by the installed otherwise the
database connection is initialised too early
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/federatedfilesharing/lib')
-rw-r--r-- | apps/federatedfilesharing/lib/Controller/RequestHandlerController.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php index fe0c7a11ab7..c5e1a8b4e7e 100644 --- a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php +++ b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php @@ -35,6 +35,7 @@ use OCP\AppFramework\OCS\OCSBadRequestException; use OCP\AppFramework\OCS\OCSException; use OCP\AppFramework\OCS\OCSForbiddenException; use OCP\AppFramework\OCSController; +use OCP\App\IAppManager; use OCP\Constants; use OCP\EventDispatcher\IEventDispatcher; use OCP\Federation\Exceptions\ProviderCouldNotAddShareException; @@ -366,7 +367,7 @@ class RequestHandlerController extends OCSController { * @return bool */ private function isS2SEnabled($incoming = false) { - $result = \OCP\App::isEnabled('files_sharing'); + $result = \OCP\Server::get(IAppManager::class)->isEnabledForUser('files_sharing'); if ($incoming) { $result = $result && $this->federatedShareProvider->isIncomingServer2serverShareEnabled(); |