From d600955a51a9536ac9ebfa7198ef963679153740 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 20 Apr 2015 11:11:52 +0200 Subject: Make getDefaultModuleId public and get module protected --- lib/private/files/storage/wrapper/encryption.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/private/files/storage/wrapper') diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php index 0dc59cbb2a0..af48d3475c3 100644 --- a/lib/private/files/storage/wrapper/encryption.php +++ b/lib/private/files/storage/wrapper/encryption.php @@ -311,12 +311,10 @@ class Encryption extends Wrapper { || $mode === 'wb' || $mode === 'wb+' ) { - if (!empty($encryptionModuleId)) { + if ($encryptionEnabled) { + // if $encryptionModuleId is empty, the default module will be used $encryptionModule = $this->encryptionManager->getEncryptionModule($encryptionModuleId); $shouldEncrypt = $encryptionModule->shouldEncrypt($fullPath); - } elseif ($encryptionEnabled) { - $encryptionModule = $this->encryptionManager->getDefaultEncryptionModule(); - $shouldEncrypt = $encryptionModule->shouldEncrypt($fullPath); } } else { // only get encryption module if we found one in the header -- cgit v1.2.3