Merge pull request #15718 from owncloud/issue/15694-display-name-of-encryption-modules
Issue/15694 display name of encryption modules
This commit is contained in:
commit
cdf82909b8
3 changed files with 7 additions and 7 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue