Skip to content

Commit

Permalink
fix(theming): Don't reset the cachebuster value when we reset theming
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 authored and backportbot[bot] committed Jul 11, 2024
1 parent c2be5b2 commit 276adec
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 @@ -460,7 +460,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 = $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', $cacheBusterKey);

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 276adec

Please sign in to comment.