Add order:comment_bumped, order:comment_bumped_asc metatags.

This commit is contained in:
evazion
2017-01-21 11:04:09 +00:00
parent 48e66cddbb
commit 601b439f96
3 changed files with 23 additions and 1 deletions

View File

@@ -316,6 +316,7 @@
"favcount", "favcount_asc",
"change", "change_asc",
"comment", "comment_asc",
"comment_bumped", "comment_bumped_asc",
"note", "note_asc",
"artcomm", "artcomm_asc",
"mpixels", "mpixels_asc",

View File

@@ -415,7 +415,13 @@ class PostQueryBuilder
relation = relation.order("posts.last_commented_at DESC NULLS LAST, posts.id DESC")
when "comment_asc", "comm_asc"
relation = relation.order("posts.last_commented_at ASC NULLS FIRST, posts.id DESC")
relation = relation.order("posts.last_commented_at ASC NULLS LAST, posts.id DESC")
when "comment_bumped"
relation = relation.order("posts.last_comment_bumped_at DESC NULLS LAST, posts.id DESC")
when "comment_bumped_asc"
relation = relation.order("posts.last_comment_bumped_at ASC NULLS LAST, posts.id DESC")
when "note"
relation = relation.order("posts.last_noted_at DESC NULLS LAST, posts.id DESC")