]> source.dussan.org Git - nextcloud-server.git/commitdiff
Refactor `OC\Server::getEncryptionFilesHelper`
authorAndrew Summers <18727110+summersab@users.noreply.github.com>
Tue, 29 Aug 2023 23:00:29 +0000 (18:00 -0500)
committerAndrew Summers <18727110+summersab@users.noreply.github.com>
Wed, 30 Aug 2023 02:29:13 +0000 (21:29 -0500)
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
lib/private/Encryption/EncryptionWrapper.php
lib/private/Encryption/HookManager.php

index 37264e8182355c1a580cad34fc9b536b95a371b6..887ca988b1addfac037b50c59ae07b16b98635c8 100644 (file)
@@ -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(
index 5081bcccf948db4f343568eb1b74e14e2def0608..0e8704ad03f219429c5557f9bf093137d2357cc3 100644 (file)
@@ -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
                        );