fix lib/private/encryption/util.php call
This commit is contained in:
parent
48fc3f3afe
commit
937efe856d
20
lib/base.php
20
lib/base.php
|
@ -704,17 +704,20 @@ class OC {
|
||||||
$enabled = self::$server->getEncryptionManager()->isEnabled();
|
$enabled = self::$server->getEncryptionManager()->isEnabled();
|
||||||
if ($enabled) {
|
if ($enabled) {
|
||||||
\OC\Files\Filesystem::addStorageWrapper('oc_encryption', function ($mountPoint, $storage, \OCP\Files\Mount\IMountPoint $mount) {
|
\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);
|
$parameters = [
|
||||||
|
'storage' => $storage,
|
||||||
|
'mountPoint' => $mountPoint,
|
||||||
|
'mount' => $mount];
|
||||||
$manager = \OC::$server->getEncryptionManager();
|
$manager = \OC::$server->getEncryptionManager();
|
||||||
$util = new \OC\Encryption\Util(new \OC\Files\View(), \OC::$server->getUserManager());
|
$util = new \OC\Encryption\Util(
|
||||||
|
new \OC\Files\View(),
|
||||||
|
\OC::$server->getUserManager(),
|
||||||
|
\OC::$server->getConfig());
|
||||||
$user = \OC::$server->getUserSession()->getUser();
|
$user = \OC::$server->getUserSession()->getUser();
|
||||||
$logger = \OC::$server->getLogger();
|
$logger = \OC::$server->getLogger();
|
||||||
$uid = $user ? $user->getUID() : null;
|
$uid = $user ? $user->getUID() : null;
|
||||||
return new \OC\Files\Storage\Wrapper\Encryption($parameters, $manager, $util, $logger, $uid);
|
return new \OC\Files\Storage\Wrapper\Encryption($parameters, $manager, $util, $logger, $uid);
|
||||||
} else {
|
|
||||||
return $storage;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -730,7 +733,10 @@ class OC {
|
||||||
}
|
}
|
||||||
$updater = new \OC\Encryption\Update(
|
$updater = new \OC\Encryption\Update(
|
||||||
new \OC\Files\View(),
|
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\Files\Filesystem::getMountManager(),
|
||||||
\OC::$server->getEncryptionManager(),
|
\OC::$server->getEncryptionManager(),
|
||||||
$uid
|
$uid
|
||||||
|
|
|
@ -66,7 +66,10 @@ class Util {
|
||||||
protected $excludedPaths;
|
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(
|
public function __construct(
|
||||||
\OC\Files\View $view,
|
\OC\Files\View $view,
|
||||||
|
|
|
@ -414,7 +414,7 @@ class Server extends SimpleContainer implements IServerContainer {
|
||||||
*/
|
*/
|
||||||
function getEncryptionKeyStorage($encryptionModuleId) {
|
function getEncryptionKeyStorage($encryptionModuleId) {
|
||||||
$view = new \OC\Files\View();
|
$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);
|
return $this->query('EncryptionKeyStorageFactory')->get($encryptionModuleId, $view, $util);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue