diff options
Diffstat (limited to 'apioforum/forum.py')
| -rw-r--r-- | apioforum/forum.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apioforum/forum.py b/apioforum/forum.py index 79bb3ee..3abe839 100644 --- a/apioforum/forum.py +++ b/apioforum/forum.py @@ -546,7 +546,7 @@ def search(): results = db.execute(""" SELECT posts.id, highlight(posts_fts, 0, '<mark>', '</mark>') AS content, posts.thread, posts.author, posts.created, posts.edited, - posts.updated, threads.title AS thread_title + posts.updated, threads.title AS thread_title, threads.forum FROM posts_fts JOIN posts ON posts_fts.rowid = posts.id JOIN threads ON threads.id = posts.thread @@ -559,6 +559,7 @@ def search(): print(e) flash('your search query was malformed.') return redirect(url_for("forum.not_actual_index")) + results = [p for p in results if has_permission(p['forum'], g.user, "p_view_threads")] display_thread_id = [ True ] * len(results) last_thread = None |
