]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix double registration of encryption module
authorThomas Müller <thomas.mueller@tmit.eu>
Tue, 31 Mar 2015 11:48:27 +0000 (13:48 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Tue, 7 Apr 2015 11:30:29 +0000 (13:30 +0200)
apps/encryption/appinfo/app.php
apps/encryption/appinfo/application.php
lib/private/encryption/manager.php

index 38f9ff2f040b073470dd1a8f1d9a48e86dfa1bb8..8573f8d605d0f4c7ba124483fa5d912b2bb93b2a 100644 (file)
@@ -21,8 +21,5 @@
 
 namespace OCA\Encryption\AppInfo;
 
-if (!\OC::$CLI) {
-       $di = \OC::$server;
-       $app = new Application();
-}
-
+$app = new Application();
+$app->registerEncryptionModule();
index be432b1a5a81c2d9b82a6a4b52907c34bfdde190..30962e83adacc7af32eb0ab36b88efb5c664cacf 100644 (file)
@@ -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();
        }
index bf411ea95e992e0952e817e3470fc8186c79f61a..cf11c3cf3354f1159fba68c9ba73c5d32a9f6115 100644 (file)
@@ -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)) {