simplify encryption manager fetching in DIContainer

This commit is contained in:
Arthur Schiwon 2016-08-13 01:26:11 +02:00 committed by Lukas Reschke
parent 9111b52fef
commit 57295ee35f
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
1 changed files with 2 additions and 16 deletions

View File

@ -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();
});