diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-18 22:51:15 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-18 22:51:15 +0200 |
commit | cdf82909b8225a885fbf92b78208fb1fe258853e (patch) | |
tree | 645bada4dd0189831330e387cffa0b3696348d3f | |
parent | b7a4972218ccaa1f030762783cd41a965095e741 (diff) | |
parent | 491e5901652474fdf30fcab5d1deb8e8193dc5de (diff) | |
download | nextcloud-server-cdf82909b8225a885fbf92b78208fb1fe258853e.tar.gz nextcloud-server-cdf82909b8225a885fbf92b78208fb1fe258853e.zip |
Merge pull request #15718 from owncloud/issue/15694-display-name-of-encryption-modules
Issue/15694 display name of encryption modules
-rw-r--r-- | apps/encryption_dummy/appinfo/app.php | 2 | ||||
-rw-r--r-- | lib/private/encryption/manager.php | 8 | ||||
-rw-r--r-- | settings/admin.php | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/apps/encryption_dummy/appinfo/app.php b/apps/encryption_dummy/appinfo/app.php index fa17e676eda..f04886f9f1f 100644 --- a/apps/encryption_dummy/appinfo/app.php +++ b/apps/encryption_dummy/appinfo/app.php @@ -2,5 +2,5 @@ $manager = \OC::$server->getEncryptionManager(); $module = new \OCA\Encryption_Dummy\DummyModule(); -$manager->registerEncryptionModule($module); +$manager->registerEncryptionModule('OC_DUMMY_MODULE', 'Dummy Encryption Module', $module); diff --git a/lib/private/encryption/manager.php b/lib/private/encryption/manager.php index e01054c92a4..7a3f17519fc 100644 --- a/lib/private/encryption/manager.php +++ b/lib/private/encryption/manager.php @@ -106,11 +106,11 @@ class Manager implements IManager { $this->setDefaultEncryptionModule($id); } - $this->encryptionModules[$id] = array( + $this->encryptionModules[$id] = [ 'id' => $id, - 'displayName' => 'displayName', - 'callback' => $callback - ); + 'displayName' => $displayName, + 'callback' => $callback, + ]; } /** diff --git a/settings/admin.php b/settings/admin.php index 773e8276534..94e48aab14e 100644 --- a/settings/admin.php +++ b/settings/admin.php @@ -92,13 +92,13 @@ try { $defaultEncryptionModule = \OC::$server->getEncryptionManager()->getDefaultEncryptionModule(); $defaultEncryptionModuleId = $defaultEncryptionModule->getId(); } catch (Exception $e) { - $defaultEncryptionModule = null; + $defaultEncryptionModuleId = null; } $encModulues = array(); foreach ($encryptionModules as $module) { $encModulues[$module['id']]['displayName'] = $module['displayName']; $encModulues[$module['id']]['default'] = false; - if ($defaultEncryptionModule && $module['id'] === $defaultEncryptionModuleId) { + if ($module['id'] === $defaultEncryptionModuleId) { $encModulues[$module['id']]['default'] = true; } } |