This commit is contained in:
Aevann1 2021-11-30 16:23:34 +02:00
parent dd4fb5b411
commit 872b1b11eb
8 changed files with 13 additions and 14 deletions

View file

@ -243,7 +243,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
elif sort == "old":
posts = posts.order_by(Submission.created_utc.asc())
elif sort == "controversial":
posts = posts.order_by(-1 * Submission.realupvotes * Submission.realdownvotes * Submission.downvotes)
posts = posts.order_by(-1 * Submission.realupvotes * Submission.realdownvotes * Submission.realdownvotes)
elif sort == "top":
posts = posts.order_by(Submission.realdownvotes - Submission.realupvotes)
elif sort == "bottom":
@ -340,7 +340,7 @@ def changeloglist(v=None, sort="new", page=1 ,t="all"):
elif sort == "old":
posts = posts.order_by(Submission.created_utc.asc())
elif sort == "controversial":
posts = posts.order_by(-1 * Submission.realupvotes * Submission.realdownvotes * Submission.downvotes)
posts = posts.order_by(-1 * Submission.realupvotes * Submission.realdownvotes * Submission.realdownvotes)
elif sort == "top":
posts = posts.order_by(Submission.realdownvotes - Submission.realupvotes)
elif sort == "bottom":
@ -407,7 +407,7 @@ def comment_idlist(page=1, v=None, nsfw=False, sort="new", t="all"):
elif sort == "old":
comments = comments.order_by(Comment.created_utc.asc())
elif sort == "controversial":
comments = comments.order_by(-1 * Comment.realupvotes * Comment.realdownvotes * Comment.downvotes)
comments = comments.order_by(-1 * Comment.realupvotes * Comment.realdownvotes * Comment.realdownvotes)
elif sort == "top":
comments = comments.order_by(Comment.realdownvotes - Comment.realupvotes)
elif sort == "bottom":