]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(theming): Don't reset the cachebuster value when we reset theming 46433/head
authorMarcel Müller <marcel-mueller@gmx.de>
Wed, 10 Jul 2024 20:23:39 +0000 (22:23 +0200)
committerAndy Scherzinger <info@andy-scherzinger.de>
Thu, 11 Jul 2024 06:31:04 +0000 (08:31 +0200)
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
apps/theming/lib/ThemingDefaults.php

index 210029ae6369455b12805c4820e72b04021a1d52..29a4da1959d5de35e59620246d9c9c6221ea0bf2 100644 (file)
@@ -460,7 +460,11 @@ class ThemingDefaults extends \OC_Defaults {
         * 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');
                $this->config->deleteAppValues('theming');
+               $this->config->setAppValue('theming', 'cachebuster', $cacheBusterKey);
                $this->increaseCacheBuster();
        }