fix favcount

This commit is contained in:
albert
2013-02-23 19:46:32 -05:00
parent 3b4222cacd
commit 586c9a7258
3 changed files with 10 additions and 0 deletions

View File

@@ -207,6 +207,12 @@ class PostQueryBuilder
when "score_asc"
relation = relation.order("posts.score, posts.id DESC")
when "favcount"
relation = relation.order("posts.fav_count DESC, posts.id DESC")
when "favcount_asc"
relation = relation.order("posts.fav_count, posts.id DESC")
when "mpixels", "mpixels_desc"
# Use "w*h/1000000", even though "w*h" would give the same result, so this can use