From 006c204d19faf6163099bd27eeb8bf843b4b2275 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 26 Nov 2021 03:07:28 +0200 Subject: [PATCH] dfsf --- files/routes/posts.py | 4 ++-- files/templates/header.html | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index b1e5dddb8..acce38216 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -118,7 +118,7 @@ def post_id(pid, anything=None, v=None): elif v: defaultsortingcomments = v.defaultsortingcomments else: defaultsortingcomments = "top" - sort=request.values.get("sort", defaultsortingcomments) + sort = request.values.get("sort", defaultsortingcomments) try: pid = int(pid) except: @@ -201,7 +201,7 @@ def post_id(pid, anything=None, v=None): post.replies = comments.filter(Comment.is_pinned != None).all() + comments.filter(Comment.level == 1, Comment.is_pinned == None).all() - if request.host == 'rdrama.net' and pid in [BUG_THREAD, EMOJI_THREAD] and sort == 'new': post.replies = post.replies[:10] + if request.host == 'rdrama.net' and pid in [BUG_THREAD, EMOJI_THREAD] and not request.values.get("sort"): post.replies = post.replies[:10] post.views += 1 g.db.add(post) diff --git a/files/templates/header.html b/files/templates/header.html index 57edc796f..724e2d81c 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -133,8 +133,10 @@ Source code - Report bugs or suggestions - + {% if request.host in ['rdrama.net', 'pcmemes.net'] %} + Report bugs or suggestions + {% endif %} + {% if 'pcm' not in request.host %} Discord {% endif %} @@ -193,7 +195,9 @@ Source code - Report bugs or suggestions + {% if request.host in ['rdrama.net', 'pcmemes.net'] %} + Report bugs or suggestions + {% endif %} {% if 'pcm' not in request.host %} Discord