diff options
| author | 2020-07-14 11:02:30 +0200 | |
|---|---|---|
| committer | 2020-07-14 11:02:30 +0200 | |
| commit | 35eed83b64486d7c0e6f62dafc4ddf70e7a50513 (patch) | |
| tree | dc725021f39650ffb8f856d5f8e0df4528caabe8 /lib/lib_rss.php | |
| parent | 8d8211b2a5fa997bce06d7ae0c6f7cf37f97b245 (diff) | |
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
Diffstat (limited to 'lib/lib_rss.php')
| -rw-r--r-- | lib/lib_rss.php | 4 |
1 files changed, 3 insertions, 1 deletions
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]; |
