From 35eed83b64486d7c0e6f62dafc4ddf70e7a50513 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Tue, 14 Jul 2020 11:02:30 +0200 Subject: Add a way to disable shortcuts (#3114) When the user do not want to use a shortcut, he can let the shortcut value empty. This will save an empty configuration thus disabling the shortcut. The load default action allows to use default shortcut only for disabled shortcuts. See #3110 --- lib/lib_rss.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/lib_rss.php') diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 972f650bd..52c986433 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -540,7 +540,9 @@ function validateShortcutList($shortcuts) { $shortcuts_ok = array(); foreach ($shortcuts as $key => $value) { - if (in_array($value, SHORTCUT_KEYS)) { + if ('' === $value) { + $shortcuts_ok[$key] = $value; + } elseif (in_array($value, SHORTCUT_KEYS)) { $shortcuts_ok[$key] = $value; } elseif (isset($legacy[$value])) { $shortcuts_ok[$key] = $legacy[$value]; -- cgit v1.2.3