diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-03-30 10:37:31 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-07 13:30:28 +0200 |
commit | 937efe856d5f65706f2074a45d781d5944ba2494 (patch) | |
tree | f757dff26658115014a15a017f9d5f9c06598ac8 /lib/base.php | |
parent | 48fc3f3afe410ee02ed9e98f4cafaaeca99ce70c (diff) | |
download | nextcloud-server-937efe856d5f65706f2074a45d781d5944ba2494.tar.gz nextcloud-server-937efe856d5f65706f2074a45d781d5944ba2494.zip |
fix lib/private/encryption/util.php call
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/lib/base.php b/lib/base.php index 98da75b61a8..5d1e16296c0 100644 --- a/lib/base.php +++ b/lib/base.php @@ -704,17 +704,20 @@ class OC { $enabled = self::$server->getEncryptionManager()->isEnabled(); if ($enabled) { \OC\Files\Filesystem::addStorageWrapper('oc_encryption', function ($mountPoint, $storage, \OCP\Files\Mount\IMountPoint $mount) { - if($mount->getOption('encrypt', true)) { - $parameters = array('storage' => $storage, 'mountPoint' => $mountPoint); - $manager = \OC::$server->getEncryptionManager(); - $util = new \OC\Encryption\Util(new \OC\Files\View(), \OC::$server->getUserManager()); - $user = \OC::$server->getUserSession()->getUser(); - $logger = \OC::$server->getLogger(); - $uid = $user ? $user->getUID() : null; - return new \OC\Files\Storage\Wrapper\Encryption($parameters, $manager, $util, $logger, $uid); - } else { - return $storage; - } + + $parameters = [ + 'storage' => $storage, + 'mountPoint' => $mountPoint, + 'mount' => $mount]; + $manager = \OC::$server->getEncryptionManager(); + $util = new \OC\Encryption\Util( + new \OC\Files\View(), + \OC::$server->getUserManager(), + \OC::$server->getConfig()); + $user = \OC::$server->getUserSession()->getUser(); + $logger = \OC::$server->getLogger(); + $uid = $user ? $user->getUID() : null; + return new \OC\Files\Storage\Wrapper\Encryption($parameters, $manager, $util, $logger, $uid); }); } @@ -730,7 +733,10 @@ class OC { } $updater = new \OC\Encryption\Update( new \OC\Files\View(), - new \OC\Encryption\Util(new \OC\Files\View(), \OC::$server->getUserManager()), + new \OC\Encryption\Util( + new \OC\Files\View(), + \OC::$server->getUserManager(), + \OC::$server->getConfig()), \OC\Files\Filesystem::getMountManager(), \OC::$server->getEncryptionManager(), $uid |