From 8e48efa5e447c8ade475b8116d087e1794bb18b7 Mon Sep 17 00:00:00 2001 From: Thomas Skerbis Date: Thu, 17 Sep 2026 19:53:32 +0200 Subject: [PATCH] Fix: clearing multi-select favorites doesn't persist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Browsers don't submit a multi-select field at all when every option is deselected, so the previously saved value for quick_navigation_favs and quick_navigation_addon_favs was never overwritten with an empty selection — the old favorites kept reappearing after save. Normalize both to an empty array when missing from the POST payload, matching the existing handling for quick_navigation_disabled_buttons. Co-Authored-By: Claude Sonnet 5 --- pages/config.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pages/config.php b/pages/config.php index 7398eff..a058870 100644 --- a/pages/config.php +++ b/pages/config.php @@ -34,6 +34,15 @@ $config['quick_navigation_disabled_buttons' . $user] = []; } + // Multi-Selects: bei leerer Auswahl schickt der Browser das Feld gar nicht mit, + // ohne diese Normalisierung bliebe der zuletzt gespeicherte Wert stehen. + if (!isset($config['quick_navigation_favs' . $user])) { + $config['quick_navigation_favs' . $user] = []; + } + if (!isset($config['quick_navigation_addon_favs' . $user])) { + $config['quick_navigation_addon_favs' . $user] = []; + } + $package->setConfig($config); echo rex_view::success($package->i18n('quick_navigation_config_saved')); }