From 592216588c4c2e02606e81d93e87579400ed6f2c Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Wed, 12 Apr 2023 18:24:33 +0200 Subject: [PATCH] Revert "post" as search request. Search request is now get again (fix for #2741) Revert "Auxiliary commit to revert individual files from 275675b48add79d2bbce06426cc1224c5e2c1bfb" This reverts commit 6c920bc49f133d5c7451230448121f1f8b3cd9f2. --- cps/search.py | 7 +++---- cps/templates/layout.html | 3 +-- cps/web.py | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/cps/search.py b/cps/search.py index 96f21d62..096b2928 100644 --- a/cps/search.py +++ b/cps/search.py @@ -35,13 +35,12 @@ search = Blueprint('search', __name__) log = logger.create() -@search.route("/search", methods=["POST"]) +@search.route("/search", methods=["GET"]) @login_required_if_no_ano def simple_search(): - term = dict(request.form).get("query") + term = request.args.get("query") if term: - flask_session['query'] = json.dumps(term.strip()) - return redirect(url_for('web.books_list', data="search", sort_param='stored', query="")) # term.strip() + return redirect(url_for('web.books_list', data="search", sort_param='stored', query=term.strip())) else: return render_title_template('search.html', searchterm="", diff --git a/cps/templates/layout.html b/cps/templates/layout.html index f6423bb3..07adbabd 100644 --- a/cps/templates/layout.html +++ b/cps/templates/layout.html @@ -41,8 +41,7 @@
{% endif %} {% if current_user.is_authenticated or g.allow_anonymous %} -