From 9b54602cf02ac715d682a17a1efa96c0521e4101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Wed, 10 Jul 2024 22:23:39 +0200 Subject: [PATCH] fix(theming): Don't reset the cachebuster value when we reset themeing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- apps/theming/lib/ThemingDefaults.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index 1b31f91eeff5f..a416c5bc50256 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -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'); $this->config->deleteAppValues('theming'); + $this->config->setAppValue('theming', 'cachebuster', (string)($cacheBusterKey + 1)); $this->increaseCacheBuster(); }