From 4d1770398a6af8902e75c0bd885781584d39e796 Mon Sep 17 00:00:00 2001 From: marc Date: Thu, 20 Jul 2017 15:47:20 -0500 Subject: remove 'all' option from search languages --- searx/search.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'searx/search.py') 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) -- cgit v1.2.3-54-g00ecf