diff options
author | Adam Tauber <asciimoo@gmail.com> | 2017-12-05 22:30:20 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2017-12-05 22:30:20 +0100 |
commit | e060aedc16bb2b9e5c1ee3fc69a0e07a3576a80c (patch) | |
tree | 668f5eb13df2dc3ca242b272b0584a9a4d7f64e7 /searx/preferences.py | |
parent | 46fb0d860e35a45658969c4e2ac306a1072bc331 (diff) | |
download | searxng-e060aedc16bb2b9e5c1ee3fc69a0e07a3576a80c.tar.gz searxng-e060aedc16bb2b9e5c1ee3fc69a0e07a3576a80c.zip |
[enh] make custom oscar option configurable from url
Diffstat (limited to 'searx/preferences.py')
-rw-r--r-- | searx/preferences.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/searx/preferences.py b/searx/preferences.py index dde4f098a..abd11d71e 100644 --- a/searx/preferences.py +++ b/searx/preferences.py @@ -305,6 +305,8 @@ class Preferences(object): elif user_setting_name == 'disabled_plugins': self.plugins.parse_cookie((input_data.get('disabled_plugins', ''), input_data.get('enabled_plugins', ''))) + else: + self.unknown_params[user_setting_name] = user_setting def parse_form(self, input_data): disabled_engines = [] @@ -329,6 +331,8 @@ class Preferences(object): def get_value(self, user_setting_name): if user_setting_name in self.key_value_settings: return self.key_value_settings[user_setting_name].get_value() + if user_setting_name in self.unknown_params: + return self.unknown_params[user_setting_name] def save(self, resp): for user_setting_name, user_setting in self.key_value_settings.items(): |