summaryrefslogtreecommitdiff
path: root/searx/search.py
diff options
context:
space:
mode:
authormarc <a01200356@itesm.mx>2017-07-20 15:47:20 -0500
committerMarc Abonce Seguin <marc-abonce@mailbox.org>2017-12-06 01:20:15 -0600
commit4d1770398a6af8902e75c0bd885781584d39e796 (patch)
tree1ad30e59206eca081c93a2ad37928ce059f7d114 /searx/search.py
parent46fb0d860e35a45658969c4e2ac306a1072bc331 (diff)
downloadsearxng-4d1770398a6af8902e75c0bd885781584d39e796.tar.gz
searxng-4d1770398a6af8902e75c0bd885781584d39e796.zip
remove 'all' option from search languages
Diffstat (limited to 'searx/search.py')
-rw-r--r--searx/search.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/searx/search.py b/searx/search.py
index 1bfb47260..b523c2754 100644
--- a/searx/search.py
+++ b/searx/search.py
@@ -24,7 +24,7 @@ from flask_babel import gettext
import requests.exceptions
import searx.poolrequests as requests_lib
from searx.engines import (
- categories, engines
+ categories, engines, settings
)
from searx.answerers import ask
from searx.utils import gen_useragent
@@ -220,6 +220,10 @@ def get_search_query_from_webapp(preferences, form):
else:
query_lang = preferences.get_value('language')
+ # provides backwards compatibility for requests using old language default
+ if query_lang == 'all':
+ query_lang = settings['search']['language']
+
# check language
if not VALID_LANGUAGE_CODE.match(query_lang):
raise SearxParameterException('language', query_lang)