diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-07-14 20:44:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-14 20:44:05 +0200 |
commit | 2ad95feab6dd525cdda5aa61c22119c98d21ca97 (patch) | |
tree | 5a6d920337fff7c427174deb4c0bc558110ef81b /apps/settings | |
parent | 157c6527625cbe90649e32fe1b5dd99771e7541d (diff) | |
parent | 7e281a07bb66a082a35cbdd52f7d1e418beb4f53 (diff) | |
download | nextcloud-server-2ad95feab6dd525cdda5aa61c22119c98d21ca97.tar.gz nextcloud-server-2ad95feab6dd525cdda5aa61c22119c98d21ca97.zip |
Merge pull request #21816 from nextcloud/techdebt/noid/federatedfilesharing-to-ibootstrap
Use IBootstrap for the app federatedfilesharing
Diffstat (limited to 'apps/settings')
-rw-r--r-- | apps/settings/lib/Controller/UsersController.php | 4 | ||||
-rw-r--r-- | apps/settings/lib/Settings/Personal/PersonalInfo.php | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php index eab6c087d86..b6e43fcae85 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -36,6 +36,7 @@ use OC\AppFramework\Http; use OC\Encryption\Exceptions\ModuleDoesNotExistsException; use OC\ForbiddenException; use OC\Security\IdentityProof\Manager; +use OCA\FederatedFileSharing\FederatedShareProvider; use OCA\Settings\BackgroundJobs\VerifyUserData; use OCA\User_LDAP\User_Proxy; use OCP\App\IAppManager; @@ -362,8 +363,7 @@ class UsersController extends Controller { $data[AccountManager::PROPERTY_EMAIL] = ['value' => $email, 'scope' => $emailScope]; } if ($this->appManager->isEnabledForUser('federatedfilesharing')) { - $federatedFileSharing = new \OCA\FederatedFileSharing\AppInfo\Application(); - $shareProvider = $federatedFileSharing->getFederatedShareProvider(); + $shareProvider = \OC::$server->query(FederatedShareProvider::class); if ($shareProvider->isLookupServerUploadEnabled()) { $data[AccountManager::PROPERTY_WEBSITE] = ['value' => $website, 'scope' => $websiteScope]; $data[AccountManager::PROPERTY_ADDRESS] = ['value' => $address, 'scope' => $addressScope]; diff --git a/apps/settings/lib/Settings/Personal/PersonalInfo.php b/apps/settings/lib/Settings/Personal/PersonalInfo.php index 152259b743f..c4b505c4248 100644 --- a/apps/settings/lib/Settings/Personal/PersonalInfo.php +++ b/apps/settings/lib/Settings/Personal/PersonalInfo.php @@ -32,7 +32,7 @@ namespace OCA\Settings\Settings\Personal; use OC\Accounts\AccountManager; -use OCA\FederatedFileSharing\AppInfo\Application; +use OCA\FederatedFileSharing\FederatedShareProvider; use OCP\App\IAppManager; use OCP\AppFramework\Http\TemplateResponse; use OCP\Files\FileInfo; @@ -96,8 +96,8 @@ class PersonalInfo implements ISettings { $federatedFileSharingEnabled = $this->appManager->isEnabledForUser('federatedfilesharing'); $lookupServerUploadEnabled = false; if ($federatedFileSharingEnabled) { - $federatedFileSharing = \OC::$server->query(Application::class); - $shareProvider = $federatedFileSharing->getFederatedShareProvider(); + /** @var FederatedShareProvider $shareProvider */ + $shareProvider = \OC::$server->query(FederatedShareProvider::class); $lookupServerUploadEnabled = $shareProvider->isLookupServerUploadEnabled(); } |