remotes/1693045480750635534/spooky-22
Aevann1 2021-11-26 02:26:29 +02:00
parent 3ab0b3c004
commit 13072fdc5a
1 changed files with 4 additions and 0 deletions

View File

@ -127,6 +127,8 @@ def post_id(pid, anything=None, v=None):
if post.club and not (v and v.paid_dues) or post.private and not (v and (v.id == post.author_id or v.admin_level > 1)): abort(403)
if request.host == 'rdrama.net' and pid == 22479: sort = 'new'
if v:
votes = g.db.query(CommentVote).filter_by(user_id=v.id).subquery()
@ -198,6 +200,8 @@ 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 == 22479: post.replies = post.replies[:20]
post.views += 1
g.db.add(post)
if isinstance(session.get('over_18', 0), dict): session["over_18"] = 0