From a98b7dbf6fc3a190d995326ea97f88296ed89080 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20M=C3=BCller?= Date: Tue, 31 Mar 2015 13:48:27 +0200 Subject: [PATCH] Fix double registration of encryption module --- apps/encryption/appinfo/app.php | 7 ++----- apps/encryption/appinfo/application.php | 2 +- lib/private/encryption/manager.php | 5 +---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/apps/encryption/appinfo/app.php b/apps/encryption/appinfo/app.php index 38f9ff2f040..8573f8d605d 100644 --- a/apps/encryption/appinfo/app.php +++ b/apps/encryption/appinfo/app.php @@ -21,8 +21,5 @@ namespace OCA\Encryption\AppInfo; -if (!\OC::$CLI) { - $di = \OC::$server; - $app = new Application(); -} - +$app = new Application(); +$app->registerEncryptionModule(); diff --git a/apps/encryption/appinfo/application.php b/apps/encryption/appinfo/application.php index be432b1a5a8..30962e83ada 100644 --- a/apps/encryption/appinfo/application.php +++ b/apps/encryption/appinfo/application.php @@ -55,7 +55,7 @@ class Application extends \OCP\AppFramework\App { $this->encryptionManager = \OC::$server->getEncryptionManager(); $this->config = \OC::$server->getConfig(); $this->registerServices(); - $this->registerEncryptionModule(); +// $this->registerEncryptionModule(); $this->registerHooks(); $this->registerSettings(); } diff --git a/lib/private/encryption/manager.php b/lib/private/encryption/manager.php index bf411ea95e9..cf11c3cf335 100644 --- a/lib/private/encryption/manager.php +++ b/lib/private/encryption/manager.php @@ -69,14 +69,11 @@ class Manager implements \OCP\Encryption\IManager { $id = $module->getId(); $name = $module->getDisplayName(); - // FIXME why do we load the same encryption module multiple times - /* if (isset($this->encryptionModules[$id])) { $message = 'Id "' . $id . '" already used by encryption module "' . $name . '"'; throw new Exceptions\ModuleAlreadyExistsException($message); - } -*/ + $defaultEncryptionModuleId = $this->getDefaultEncryptionModuleId(); if (empty($defaultEncryptionModuleId)) { -- 2.39.5