summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2016-08-13 01:26:11 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2016-08-13 01:26:11 +0200
commit8188bb4509e62e67c8f65d6b449e9084dd7cf5a4 (patch)
treed17edac2b5172264d31172d2a28dbf67f41be43b
parent158d78e1abf150faf122ae91a9965605a413ffe5 (diff)
downloadnextcloud-server-8188bb4509e62e67c8f65d6b449e9084dd7cf5a4.tar.gz
nextcloud-server-8188bb4509e62e67c8f65d6b449e9084dd7cf5a4.zip
simplify encryption manager fetching in DIContainer
-rw-r--r--lib/private/AppFramework/DependencyInjection/DIContainer.php18
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php
index 4e3cac6d1ea..22bcc004626 100644
--- a/lib/private/AppFramework/DependencyInjection/DIContainer.php
+++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php
@@ -310,22 +310,8 @@ class DIContainer extends SimpleContainer implements IAppContainer {
return $c->query('ServerContainer')->getWebRoot();
});
- $this->registerService('\OCP\Encryption\IManager', function ($c) {
- $view = new \OC\Files\View();
- $util = new \OC\Encryption\Util(
- $view,
- $c->query('\OCP\IUserManager'),
- $c->query('\OCP\IGroupManager'),
- $c->query('\OCP\IConfig')
- );
- return new \OC\Encryption\Manager(
- $c->query('\OCP\IConfig'),
- $c->query('\OCP\ILogger'),
- $c->query('ServerContainer')->getL10N('core'),
- new \OC\Files\View(),
- $util,
- new \OC\Memcache\ArrayCache()
- );
+ $this->registerService('OCP\Encryption\IManager', function ($c) {
+ return $this->getServer()->getEncryptionManager();
});