simplify encryption manager fetching in DIContainer
This commit is contained in:
parent
9111b52fef
commit
57295ee35f
|
@ -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();
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue