master
Aevann1 2021-11-26 03:07:28 +02:00
parent 4a45452a8c
commit 006c204d19
2 changed files with 9 additions and 5 deletions

View File

@ -118,7 +118,7 @@ def post_id(pid, anything=None, v=None):
elif v: defaultsortingcomments = v.defaultsortingcomments elif v: defaultsortingcomments = v.defaultsortingcomments
else: defaultsortingcomments = "top" else: defaultsortingcomments = "top"
sort=request.values.get("sort", defaultsortingcomments) sort = request.values.get("sort", defaultsortingcomments)
try: pid = int(pid) try: pid = int(pid)
except: 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() 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 post.views += 1
g.db.add(post) g.db.add(post)

View File

@ -133,8 +133,10 @@
<a class="dropdown-item" rel="nofollow noopener noreferrer" href="https://github.com/Aevann1/Drama"><i class="fab fa-github fa-fw text-left mr-3"></i>Source code</a> <a class="dropdown-item" rel="nofollow noopener noreferrer" href="https://github.com/Aevann1/Drama"><i class="fab fa-github fa-fw text-left mr-3"></i>Source code</a>
<a class="dropdown-item" rel="nofollow noopener noreferrer" href="/report_bugs"><i class="fas fa-bug fa-fw text-left mr-3"></i>Report bugs or suggestions</a> {% if request.host in ['rdrama.net', 'pcmemes.net'] %}
<a class="dropdown-item" rel="nofollow noopener noreferrer" href="/report_bugs"><i class="fas fa-bug fa-fw text-left mr-3"></i>Report bugs or suggestions</a>
{% endif %}
{% if 'pcm' not in request.host %} {% if 'pcm' not in request.host %}
<a class="dropdown-item" href="/discord"><i class="fab fa-discord fa-fw text-left mr-3"></i>Discord</a> <a class="dropdown-item" href="/discord"><i class="fab fa-discord fa-fw text-left mr-3"></i>Discord</a>
{% endif %} {% endif %}
@ -193,7 +195,9 @@
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="https://github.com/Aevann1/Drama"><i class="fab fa-github fa-fw mr-3"></i>Source code</a> <a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="https://github.com/Aevann1/Drama"><i class="fab fa-github fa-fw mr-3"></i>Source code</a>
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="/report_bugs"><i class="fas fa-bug fa-fw mr-3"></i>Report bugs or suggestions</a> {% if request.host in ['rdrama.net', 'pcmemes.net'] %}
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="/report_bugs"><i class="fas fa-bug fa-fw mr-3"></i>Report bugs or suggestions</a>
{% endif %}
{% if 'pcm' not in request.host %} {% if 'pcm' not in request.host %}
<a class="nav-item nav-link" href="/discord"><i class="fab fa-discord fa-fw mr-3"></i>Discord</a> <a class="nav-item nav-link" href="/discord"><i class="fab fa-discord fa-fw mr-3"></i>Discord</a>