diff --git a/files/routes/search.py b/files/routes/search.py index d3afdc5ca..9d62b6212 100644 --- a/files/routes/search.py +++ b/files/routes/search.py @@ -53,6 +53,10 @@ def searchparse(text): def searchposts(v): query = request.values.get("q", '').strip() + author = request.values.get('author') + if author: + return redirect(f"/search/posts?q=author:{author} {query}") + criteria = searchparse(query) if 'post' in criteria: @@ -197,6 +201,10 @@ def searchposts(v): def searchcomments(v): query = request.values.get("q", '').strip() + author = request.values.get('author') + if author: + return redirect(f"/search/comments?q=author:{author} {query}") + page = get_page() sort = request.values.get("sort", "new").lower() diff --git a/files/templates/userpage/header.html b/files/templates/userpage/header.html index 605fc789f..f614b5625 100644 --- a/files/templates/userpage/header.html +++ b/files/templates/userpage/header.html @@ -39,8 +39,10 @@ -