diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-10-31 13:55:03 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-10-31 13:55:03 +0100 |
commit | bcfac75b06038b45d35f54955fcfcde4197c1453 (patch) | |
tree | 835cc36af2ac5c722c164d412c0218230a104f22 /lib/private/Server.php | |
parent | 4b24dea6c725869f6994452af9d81b96fe4f05dd (diff) | |
download | nextcloud-server-bcfac75b06038b45d35f54955fcfcde4197c1453.tar.gz nextcloud-server-bcfac75b06038b45d35f54955fcfcde4197c1453.zip |
simplify registration of manager in server container
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r-- | lib/private/Server.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php index c03b7e04606..1621a194693 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -106,6 +106,7 @@ use OCA\Theming\ThemingDefaults; use OCP\App\IAppManager; use OCP\AppFramework\Utility\ITimeFactory; +use OCP\Collaboration\AutoComplete\IManager; use OCP\Defaults; use OCA\Theming\Util; use OCP\Federation\ICloudIdManager; @@ -1011,10 +1012,7 @@ class Server extends ServerContainer implements IServerContainer { }); $this->registerAlias('CollaboratorSearch', \OCP\Collaboration\Collaborators\ISearch::class); - $this->registerService(\OCP\Collaboration\AutoComplete\IManager::class, function (Server $c) { - return new Collaboration\AutoComplete\Manager($c); - }); - $this->registerAlias('AutoCompleteManager', \OCP\Collaboration\AutoComplete\IManager::class); + $this->registerAlias(\OCP\Collaboration\AutoComplete\IManager::class, \OC\Collaboration\AutoComplete\Manager::class); $this->registerService('SettingsManager', function (Server $c) { $manager = new \OC\Settings\Manager( @@ -1810,7 +1808,7 @@ class Server extends ServerContainer implements IServerContainer { * @return \OCP\Collaboration\AutoComplete\IManager */ public function getAutoCompleteManager(){ - return $this->query('AutoCompleteManager'); + return $this->query(IManager::class); } /** |