From 7aa89ef7c69624d5be664078dbef480a8e2d802f Mon Sep 17 00:00:00 2001
From: asciimoo
Date: Sun, 20 Oct 2013 21:31:06 +0200
Subject: [PATCH] [mod] always remember selected categories
---
searx/templates/search.html | 1 -
searx/webapp.py | 4 +---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/searx/templates/search.html b/searx/templates/search.html
index 78925084f..6c7cc444a 100644
--- a/searx/templates/search.html
+++ b/searx/templates/search.html
@@ -8,5 +8,4 @@
{% endfor %}
-
diff --git a/searx/webapp.py b/searx/webapp.py
index 0c6606e63..a5b5609d4 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -83,7 +83,6 @@ def index():
selected_engines.extend(x.name for x in categories['general'])
query = request.form['q'].encode('utf-8')
results = search(query, request, selected_engines)
- remember_categs = True if 'save' in request.form else False
if request.form.get('format') == 'json':
# TODO HTTP headers
return json.dumps({'query': query, 'results': results})
@@ -94,8 +93,7 @@ def index():
,number_of_results=len(results)
)
resp = make_response(template)
- if remember_categs:
- resp.set_cookie('categories', ','.join(selected_categories))
+ resp.set_cookie('categories', ','.join(selected_categories))
return resp
return render('index.html')