Refactor `OC\Server::getEncryptionFilesHelper`

Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
pull/40122/head
Andrew Summers 1 year ago
parent 9d1547f59d
commit be4e30917d
No known key found for this signature in database
GPG Key ID: 1E0B639A223E3E2D
  1. 3
      lib/private/Encryption/EncryptionWrapper.php
  2. 3
      lib/private/Encryption/HookManager.php

@ -28,6 +28,7 @@ use OC\Files\Filesystem;
use OC\Files\Storage\Wrapper\Encryption;
use OC\Files\View;
use OC\Memcache\ArrayCache;
use OCP\Encryption\IFile;
use OCP\Files\Mount\IMountPoint;
use OCP\Files\Storage;
use Psr\Log\LoggerInterface;
@ -79,7 +80,7 @@ class EncryptionWrapper {
$user = \OC::$server->getUserSession()->getUser();
$mountManager = Filesystem::getMountManager();
$uid = $user ? $user->getUID() : null;
$fileHelper = \OC::$server->getEncryptionFilesHelper();
$fileHelper = \OC::$server->get(IFile::class);
$keyStorage = \OC::$server->getEncryptionKeyStorage();
$util = new Util(

@ -26,6 +26,7 @@ namespace OC\Encryption;
use OC\Files\Filesystem;
use OC\Files\View;
use OC\Files\SetupManager;
use OCP\Encryption\IFile;
use Psr\Log\LoggerInterface;
class HookManager {
@ -79,7 +80,7 @@ class HookManager {
\OC::$server->getConfig()),
Filesystem::getMountManager(),
\OC::$server->getEncryptionManager(),
\OC::$server->getEncryptionFilesHelper(),
\OC::$server->get(IFile::class),
\OC::$server->get(LoggerInterface::class),
$uid
);

Loading…
Cancel
Save