summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-03-31 13:25:11 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:29 +0200
commit4db75e34074fa34d5558754e751b726338180e28 (patch)
tree866aa931eb396a1024b5cc630a440d8d005188ad /lib/base.php
parent3458b5ab4ce7d88e95afcdb3ed0e3ff79ad924c4 (diff)
downloadnextcloud-server-4db75e34074fa34d5558754e751b726338180e28.tar.gz
nextcloud-server-4db75e34074fa34d5558754e751b726338180e28.zip
Setting up the encryption wrapper in a setup hook - temporarily fixes the wrapping order
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php18
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/base.php b/lib/base.php
index 44395be627d..a5ca08123ac 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -703,24 +703,8 @@ class OC {
private static function registerEncryptionWrapper() {
$enabled = self::$server->getEncryptionManager()->isEnabled();
if ($enabled) {
- \OC\Files\Filesystem::addStorageWrapper('oc_encryption', function ($mountPoint, $storage, \OCP\Files\Mount\IMountPoint $mount) {
-
- $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);
- });
+ \OCP\Util::connectHook('OC_Filesystem', 'setup', 'OC\Encryption\Manager', 'setupStorage');
}
-
}
private static function registerEncryptionHooks() {