aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_rss.php
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <aledeg@users.noreply.github.com> 2020-07-14 11:02:30 +0200
committerGravatar GitHub <noreply@github.com> 2020-07-14 11:02:30 +0200
commit35eed83b64486d7c0e6f62dafc4ddf70e7a50513 (patch)
treedc725021f39650ffb8f856d5f8e0df4528caabe8 /lib/lib_rss.php
parent8d8211b2a5fa997bce06d7ae0c6f7cf37f97b245 (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.php4
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];