mirror of
https://github.com/searxng/searxng.git
synced 2024-12-23 09:46:31 +00:00
Patch advanced search preferences
This commit is contained in:
parent
b00f77059c
commit
22489c4b5f
2 changed files with 5 additions and 3 deletions
|
@ -397,11 +397,13 @@ class Preferences:
|
||||||
choices=['', 'logicodev', 'logicodev-dark', 'pointhi']),
|
choices=['', 'logicodev', 'logicodev-dark', 'pointhi']),
|
||||||
'advanced_search': MapSetting(
|
'advanced_search': MapSetting(
|
||||||
settings['ui'].get('advanced_search', False),
|
settings['ui'].get('advanced_search', False),
|
||||||
|
is_locked('advanced_search'),
|
||||||
map={
|
map={
|
||||||
'0': False,
|
'0': False,
|
||||||
'1': True,
|
'1': True,
|
||||||
'False': False,
|
'False': False,
|
||||||
'True': True
|
'True': True,
|
||||||
|
'on': True,
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -546,7 +546,7 @@ def index():
|
||||||
"""Render index page."""
|
"""Render index page."""
|
||||||
|
|
||||||
# UI
|
# UI
|
||||||
advanced_search = request.form.get('advanced_search', request.preferences.get_value('advanced_search'))
|
advanced_search = request.preferences.get_value('advanced_search')
|
||||||
|
|
||||||
# redirect to search if there's a query in the request
|
# redirect to search if there's a query in the request
|
||||||
if request.form.get('q'):
|
if request.form.get('q'):
|
||||||
|
@ -611,7 +611,7 @@ def search():
|
||||||
return redirect(result_container.redirect_url)
|
return redirect(result_container.redirect_url)
|
||||||
|
|
||||||
# UI
|
# UI
|
||||||
advanced_search = request.form.get('advanced_search', None)
|
advanced_search = request.preferences.get_value('advanced_search')
|
||||||
|
|
||||||
# Server-Timing header
|
# Server-Timing header
|
||||||
request.timings = result_container.get_timings()
|
request.timings = result_container.get_timings()
|
||||||
|
|
Loading…
Reference in a new issue