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();
|
||||
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);
|
||||
|
||||
$parameters = [
|
||||
'storage' => $storage,
|
||||
'mountPoint' => $mountPoint,
|
||||
'mount' => $mount];
|
||||
$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();
|
||||
$logger = \OC::$server->getLogger();
|
||||
$uid = $user ? $user->getUID() : null;
|
||||
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(
|
||||
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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue