Browse Source

Fix double registration of encryption module

remotes/origin/poc-doctrine-migrations
Thomas Müller 11 years ago
parent
commit
a98b7dbf6f
  1. 7
      apps/encryption/appinfo/app.php
  2. 2
      apps/encryption/appinfo/application.php
  3. 5
      lib/private/encryption/manager.php

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

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

5
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)) {

Loading…
Cancel
Save