mirror of
https://github.com/nextcloud/server.git
synced 2026-04-27 09:08:22 -04:00
fix(theming): make cache buster depend on the app version
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
parent
fbbc10466b
commit
087f74806d
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue