diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-03-07 10:29:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-07 10:29:04 +0100 |
commit | 7033967115ae7f5e5be8551f0530143d5b1a7885 (patch) | |
tree | b501b83e15d022425d853d9794f8634df590f501 /lib | |
parent | efcb16f85905360df183d02983bc9d8d11e4fbe5 (diff) | |
parent | 29a648ab73a242e97505547c35b812658751da23 (diff) | |
download | nextcloud-server-7033967115ae7f5e5be8551f0530143d5b1a7885.tar.gz nextcloud-server-7033967115ae7f5e5be8551f0530143d5b1a7885.zip |
Merge pull request #43996 from nextcloud/feat/store-last-known-quota-usage
feat: Store last known quota usage for a user
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/OC_Helper.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index 37fbf7f5f8f..9a12bd50e0e 100644 --- a/lib/private/legacy/OC_Helper.php +++ b/lib/private/legacy/OC_Helper.php @@ -596,6 +596,11 @@ class OC_Helper { 'mountPoint' => trim($mountPoint, '/'), ]; + if ($ownerId && $path === '/') { + // If path is root, store this as last known quota usage for this user + \OCP\Server::get(\OCP\IConfig::class)->setUserValue($ownerId, 'files', 'lastSeenQuotaUsage', (string)$relative); + } + $memcache->set($cacheKey, $info, 5 * 60); return $info; |