summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Storage/Wrapper/Quota.php
diff options
context:
space:
mode:
authorAndy Scherzinger <info@andy-scherzinger.de>2023-09-08 09:56:50 +0200
committerGitHub <noreply@github.com>2023-09-08 09:56:50 +0200
commit9cccc03d7496da8a7612536c9ce92edcc1618d73 (patch)
treed77c30e15ac5d5a7d089643b1612acce73b997f4 /lib/private/Files/Storage/Wrapper/Quota.php
parentb75c0fe3063ad0f7b820d51c22edd1c27ef33263 (diff)
parentee8c1a5c609743ba1d73d5f317bd6db050827329 (diff)
downloadnextcloud-server-9cccc03d7496da8a7612536c9ce92edcc1618d73.tar.gz
nextcloud-server-9cccc03d7496da8a7612536c9ce92edcc1618d73.zip
Merge pull request #39890 from nextcloud/less-container-queries-27
[stable27] Reduce the number of container queries
Diffstat (limited to 'lib/private/Files/Storage/Wrapper/Quota.php')
-rw-r--r--lib/private/Files/Storage/Wrapper/Quota.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Quota.php b/lib/private/Files/Storage/Wrapper/Quota.php
index cfb2c455a2c..b13aa6f9f04 100644
--- a/lib/private/Files/Storage/Wrapper/Quota.php
+++ b/lib/private/Files/Storage/Wrapper/Quota.php
@@ -45,6 +45,7 @@ class Quota extends Wrapper {
protected int|float|null $quota;
protected string $sizeRoot;
private SystemConfig $config;
+ private bool $quotaIncludeExternalStorage;
/**
* @param array $parameters
@@ -54,7 +55,7 @@ class Quota extends Wrapper {
$this->quota = $parameters['quota'] ?? null;
$this->quotaCallback = $parameters['quotaCallback'] ?? null;
$this->sizeRoot = $parameters['root'] ?? '';
- $this->config = \OC::$server->get(SystemConfig::class);
+ $this->quotaIncludeExternalStorage = $parameters['include_external_storage'] ?? false;
}
/**
@@ -82,7 +83,7 @@ class Quota extends Wrapper {
* @return int|float
*/
protected function getSize($path, $storage = null) {
- if ($this->config->getValue('quota_include_external_storage', false)) {
+ if ($this->quotaIncludeExternalStorage) {
$rootInfo = Filesystem::getFileInfo('', 'ext');
if ($rootInfo) {
return $rootInfo->getSize(true);