aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/SetupManager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/SetupManager.php')
-rw-r--r--lib/private/Files/SetupManager.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/Files/SetupManager.php b/lib/private/Files/SetupManager.php
index 7f97187179e..37ecd5779e6 100644
--- a/lib/private/Files/SetupManager.php
+++ b/lib/private/Files/SetupManager.php
@@ -21,13 +21,12 @@ use OC\Files\Storage\Wrapper\Quota;
use OC\Lockdown\Filesystem\NullStorage;
use OC\Share\Share;
use OC\Share20\ShareDisableChecker;
-use OC_App;
use OC_Hook;
-use OC_Util;
use OCA\Files_External\Config\ExternalMountPoint;
use OCA\Files_Sharing\External\Mount;
use OCA\Files_Sharing\ISharedMountPoint;
use OCA\Files_Sharing\SharedMount;
+use OCP\App\IAppManager;
use OCP\Constants;
use OCP\Diagnostics\IEventLogger;
use OCP\EventDispatcher\IEventDispatcher;
@@ -82,6 +81,7 @@ class SetupManager {
private LoggerInterface $logger,
private IConfig $config,
private ShareDisableChecker $shareDisableChecker,
+ private IAppManager $appManager,
) {
$this->cache = $cacheFactory->createDistributed('setupmanager::');
$this->listeningForProviders = false;
@@ -105,7 +105,7 @@ class SetupManager {
$this->setupBuiltinWrappersDone = true;
// load all filesystem apps before, so no setup-hook gets lost
- OC_App::loadApps(['filesystem']);
+ $this->appManager->loadApps(['filesystem']);
$prevLogging = Filesystem::logWarningWhenAddingStorageWrapper(false);
Filesystem::addStorageWrapper('mount_options', function ($mountPoint, IStorage $storage, IMountPoint $mount) {
@@ -157,7 +157,7 @@ class SetupManager {
if ($mount instanceof HomeMountPoint) {
$user = $mount->getUser();
return new Quota(['storage' => $storage, 'quotaCallback' => function () use ($user) {
- return OC_Util::getUserQuota($user);
+ return $user->getQuotaBytes();
}, 'root' => 'files', 'include_external_storage' => $quotaIncludeExternal]);
}
@@ -172,9 +172,9 @@ class SetupManager {
return new PermissionsMask([
'storage' => $storage,
'mask' => Constants::PERMISSION_ALL & ~(
- Constants::PERMISSION_UPDATE |
- Constants::PERMISSION_CREATE |
- Constants::PERMISSION_DELETE
+ Constants::PERMISSION_UPDATE
+ | Constants::PERMISSION_CREATE
+ | Constants::PERMISSION_DELETE
),
]);
}