summaryrefslogtreecommitdiffstats
path: root/apps/theming
diff options
context:
space:
mode:
authorRichard Steinmetz <richard@steinmetz.cloud>2024-08-07 09:05:12 +0200
committerRichard Steinmetz <richard@steinmetz.cloud>2024-08-07 09:48:48 +0200
commit087f74806ddf431d182636ba0bf3497fdf74fb20 (patch)
tree6a0970f27bd1deeda1e6a00e7c7415ae65905181 /apps/theming
parentfbbc10466b79caea0b9d1f718d4abdd021df241c (diff)
downloadnextcloud-server-087f74806ddf431d182636ba0bf3497fdf74fb20.tar.gz
nextcloud-server-087f74806ddf431d182636ba0bf3497fdf74fb20.zip
fix(theming): make cache buster depend on the app version
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Diffstat (limited to 'apps/theming')
-rw-r--r--apps/theming/lib/Util.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php
index ec85120413f..3ed359f7e07 100644
--- a/apps/theming/lib/Util.php
+++ b/apps/theming/lib/Util.php
@@ -311,12 +311,14 @@ class Util {
if (!is_null($user)) {
$userId = $user->getUID();
}
+ $serverVersion = \OC_Util::getVersionString();
+ $themingAppVersion = $this->appManager->getAppVersion('theming');
$userCacheBuster = '';
if ($userId) {
$userCacheBusterValue = (int)$this->config->getUserValue($userId, 'theming', 'userCacheBuster', '0');
$userCacheBuster = $userId . '_' . $userCacheBusterValue;
}
$systemCacheBuster = $this->config->getAppValue('theming', 'cachebuster', '0');
- return substr(sha1($userCacheBuster . $systemCacheBuster), 0, 8);
+ return substr(sha1($serverVersion . $themingAppVersion . $userCacheBuster . $systemCacheBuster), 0, 8);
}
}