aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/configureController.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 /app/Controllers/configureController.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 'app/Controllers/configureController.php')
-rwxr-xr-xapp/Controllers/configureController.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php
index ba7316472..78b939a91 100755
--- a/app/Controllers/configureController.php
+++ b/app/Controllers/configureController.php
@@ -174,7 +174,11 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
$this->view->list_keys = SHORTCUT_KEYS;
if (Minz_Request::isPost()) {
- FreshRSS_Context::$user_conf->shortcuts = validateShortcutList(Minz_Request::param('shortcuts'));
+ $shortcuts = Minz_Request::param('shortcuts');
+ if (false !== Minz_Request::param('load_default_shortcuts')) {
+ $shortcuts = array_filter($shortcuts);
+ }
+ FreshRSS_Context::$user_conf->shortcuts = validateShortcutList($shortcuts);
FreshRSS_Context::$user_conf->save();
invalidateHttpCache();