mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Merge pull request #47095 from nextcloud/fix/theming/cache-buster-on-upgrade
fix(theming): make cache buster depend on the app version
This commit is contained in:
commit
5d577be6cf
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