diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-20 11:11:52 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-27 11:03:51 +0200 |
commit | d600955a51a9536ac9ebfa7198ef963679153740 (patch) | |
tree | 3ff846f2b2e049de80c36bd2721bfa58eebb64a5 /lib/private/files/storage/wrapper | |
parent | 4e97228cde0016439b4cad9b118fae7380fb0874 (diff) | |
download | nextcloud-server-d600955a51a9536ac9ebfa7198ef963679153740.tar.gz nextcloud-server-d600955a51a9536ac9ebfa7198ef963679153740.zip |
Make getDefaultModuleId public and get module protected
Diffstat (limited to 'lib/private/files/storage/wrapper')
-rw-r--r-- | lib/private/files/storage/wrapper/encryption.php | 6 |
1 files changed, 2 insertions, 4 deletions
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 |