diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-03-05 12:09:36 +0100 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-03-06 12:15:03 +0100 |
commit | 80191906b3a1ad42f73317158b20555591aae6bf (patch) | |
tree | a9848999115a70668538bf9e80f11a2d613841d1 /lib/private/legacy | |
parent | 4a2330876e6576f071924b3e1b2a63d0b7f3f672 (diff) | |
download | nextcloud-server-80191906b3a1ad42f73317158b20555591aae6bf.tar.gz nextcloud-server-80191906b3a1ad42f73317158b20555591aae6bf.zip |
feat: Store last known quota usage for a user
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/legacy')
-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..2e95d5976cb 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 ($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; |