mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
consolidation of boolean expression
This commit is contained in:
parent
261966ace5
commit
f9a0380eb1
1 changed files with 2 additions and 5 deletions
|
|
@ -941,11 +941,8 @@ class Encryption extends Wrapper {
|
|||
|
||||
// if the header doesn't contain a encryption module we check if it is a
|
||||
// legacy file. If true, we add the default encryption module
|
||||
if (!isset($result[Util::HEADER_ENCRYPTION_MODULE_KEY])) {
|
||||
if (!empty($result)) {
|
||||
$result[Util::HEADER_ENCRYPTION_MODULE_KEY] = 'OC_DEFAULT_MODULE';
|
||||
} elseif ($exists) {
|
||||
$result[Util::HEADER_ENCRYPTION_MODULE_KEY] = 'OC_DEFAULT_MODULE';
|
||||
if (!isset($result[Util::HEADER_ENCRYPTION_MODULE_KEY] && (!empty($result) || $exists)) {
|
||||
$result[Util::HEADER_ENCRYPTION_MODULE_KEY] = 'OC_DEFAULT_MODULE';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue