summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/l10n/sl.js2
-rw-r--r--lib/l10n/sl.json2
-rw-r--r--lib/private/Authentication/Token/RemoteWipe.php10
-rw-r--r--lib/private/Files/Storage/Wrapper/Quota.php27
4 files changed, 25 insertions, 16 deletions
diff --git a/lib/l10n/sl.js b/lib/l10n/sl.js
index 91682f09858..82333369529 100644
--- a/lib/l10n/sl.js
+++ b/lib/l10n/sl.js
@@ -87,6 +87,8 @@ OC.L10N.register(
"%1$s via %2$s" : "%1$s prek %2$s",
"You are not allowed to share %s" : "Omogočanje souporabe %s brez ustreznih dovoljenj ni mogoče.",
"Expiration date is in the past" : "Datum preteka je že mimo!",
+ "%1$s shared »%2$s« with you" : "%1$s vam omogoči souporabo »%2$s«",
+ "%1$s shared »%2$s« with you." : "%1$s vam omogoči souporabo »%2$s«.",
"Click the button below to open it." : "Kliknite na gumb za odpiranje.",
"Could not find category \"%s\"" : "Kategorije »%s« ni mogoče najti.",
"Sunday" : "nedelja",
diff --git a/lib/l10n/sl.json b/lib/l10n/sl.json
index 015ec15538b..1406ea15e19 100644
--- a/lib/l10n/sl.json
+++ b/lib/l10n/sl.json
@@ -85,6 +85,8 @@
"%1$s via %2$s" : "%1$s prek %2$s",
"You are not allowed to share %s" : "Omogočanje souporabe %s brez ustreznih dovoljenj ni mogoče.",
"Expiration date is in the past" : "Datum preteka je že mimo!",
+ "%1$s shared »%2$s« with you" : "%1$s vam omogoči souporabo »%2$s«",
+ "%1$s shared »%2$s« with you." : "%1$s vam omogoči souporabo »%2$s«.",
"Click the button below to open it." : "Kliknite na gumb za odpiranje.",
"Could not find category \"%s\"" : "Kategorije »%s« ni mogoče najti.",
"Sunday" : "nedelja",
diff --git a/lib/private/Authentication/Token/RemoteWipe.php b/lib/private/Authentication/Token/RemoteWipe.php
index 2285ccd2cd8..e0fbf0734f5 100644
--- a/lib/private/Authentication/Token/RemoteWipe.php
+++ b/lib/private/Authentication/Token/RemoteWipe.php
@@ -57,18 +57,14 @@ class RemoteWipe {
}
/**
- * @param int $id
- *
+ * @param IToken $token
* @return bool
*
* @throws InvalidTokenException
* @throws WipeTokenException
- * @throws ExpiredTokenException
*/
- public function markTokenForWipe(int $id): bool {
- $token = $this->tokenProvider->getTokenById($id);
-
- if (!($token instanceof IWipeableToken)) {
+ public function markTokenForWipe(IToken $token): bool {
+ if (!$token instanceof IWipeableToken) {
return false;
}
diff --git a/lib/private/Files/Storage/Wrapper/Quota.php b/lib/private/Files/Storage/Wrapper/Quota.php
index b5a1be95aaf..d4e4be41f71 100644
--- a/lib/private/Files/Storage/Wrapper/Quota.php
+++ b/lib/private/Files/Storage/Wrapper/Quota.php
@@ -29,6 +29,7 @@
namespace OC\Files\Storage\Wrapper;
+use OC\Files\Filesystem;
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\Storage\IStorage;
@@ -44,6 +45,8 @@ class Quota extends Wrapper {
*/
protected $sizeRoot;
+ private $config;
+
/**
* @param array $parameters
*/
@@ -51,6 +54,7 @@ class Quota extends Wrapper {
parent::__construct($parameters);
$this->quota = $parameters['quota'];
$this->sizeRoot = isset($parameters['root']) ? $parameters['root'] : '';
+ $this->config = \OC::$server->getSystemConfig();
}
/**
@@ -65,16 +69,21 @@ class Quota extends Wrapper {
* @param \OC\Files\Storage\Storage $storage
*/
protected function getSize($path, $storage = null) {
- if (is_null($storage)) {
- $cache = $this->getCache();
- } else {
- $cache = $storage->getCache();
- }
- $data = $cache->get($path);
- if ($data instanceof ICacheEntry and isset($data['size'])) {
- return $data['size'];
+ if ($this->config->getValue('quota_include_external_storage', false)) {
+ $rootInfo = Filesystem::getFileInfo('', 'ext');
+ return $rootInfo->getSize(true);
} else {
- return \OCP\Files\FileInfo::SPACE_NOT_COMPUTED;
+ if (is_null($storage)) {
+ $cache = $this->getCache();
+ } else {
+ $cache = $storage->getCache();
+ }
+ $data = $cache->get($path);
+ if ($data instanceof ICacheEntry and isset($data['size'])) {
+ return $data['size'];
+ } else {
+ return \OCP\Files\FileInfo::SPACE_NOT_COMPUTED;
+ }
}
}