From 8188bb4509e62e67c8f65d6b449e9084dd7cf5a4 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Sat, 13 Aug 2016 01:26:11 +0200 Subject: [PATCH] simplify encryption manager fetching in DIContainer --- .../DependencyInjection/DIContainer.php | 18 ++---------------- 1 file 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(); }); -- 2.39.5