Skip to content

Commit

Permalink
fix(theming): Don't reset the cachebuster value when we reset themeing
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
  • Loading branch information
SystemKeeper committed Jul 10, 2024
1 parent 78bb1dc commit 9b54602
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/theming/lib/ThemingDefaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,11 @@ public function set($setting, $value): void {
* Revert all settings to the default value
*/
public function undoAll(): void {
// Remember the current cachebuster value, as we do not want to reset this value
// Otherwise this can lead to caching issues as the value might be known to a browser already
$cacheBusterKey = (int)$this->config->getAppValue('theming', 'cachebuster', '0');

Check notice

Code scanning / Psalm

DeprecatedMethod Note

The method OCP\IConfig::getAppValue has been marked as deprecated
$this->config->deleteAppValues('theming');
$this->config->setAppValue('theming', 'cachebuster', (string)($cacheBusterKey + 1));

Check notice

Code scanning / Psalm

DeprecatedMethod Note

The method OCP\IConfig::setAppValue has been marked as deprecated
$this->increaseCacheBuster();
}

Expand Down

0 comments on commit 9b54602

Please sign in to comment.