summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-03-30 10:37:31 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:28 +0200
commit937efe856d5f65706f2074a45d781d5944ba2494 (patch)
treef757dff26658115014a15a017f9d5f9c06598ac8 /lib
parent48fc3f3afe410ee02ed9e98f4cafaaeca99ce70c (diff)
downloadnextcloud-server-937efe856d5f65706f2074a45d781d5944ba2494.tar.gz
nextcloud-server-937efe856d5f65706f2074a45d781d5944ba2494.zip
fix lib/private/encryption/util.php call
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php30
-rw-r--r--lib/private/encryption/util.php5
-rw-r--r--lib/private/server.php2
3 files changed, 23 insertions, 14 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
diff --git a/lib/private/encryption/util.php b/lib/private/encryption/util.php
index 961e7eceb2d..d983c92781c 100644
--- a/lib/private/encryption/util.php
+++ b/lib/private/encryption/util.php
@@ -66,7 +66,10 @@ class Util {
protected $excludedPaths;
/**
- * @param \OC\Files\View $view root view
+ *
+ * @param \OC\Files\View $view
+ * @param \OC\User\Manager $userManager
+ * @param IConfig $config
*/
public function __construct(
\OC\Files\View $view,
diff --git a/lib/private/server.php b/lib/private/server.php
index 6a2e45aa59d..d9c580c0f0c 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -414,7 +414,7 @@ class Server extends SimpleContainer implements IServerContainer {
*/
function getEncryptionKeyStorage($encryptionModuleId) {
$view = new \OC\Files\View();
- $util = new \OC\Encryption\Util($view, \OC::$server->getUserManager());
+ $util = new \OC\Encryption\Util($view, \OC::$server->getUserManager(), \OC::$server->getConfig());
return $this->query('EncryptionKeyStorageFactory')->get($encryptionModuleId, $view, $util);
}