From d74eda2b96e49119c9a71d39b33843a413dc518a Mon Sep 17 00:00:00 2001 From: evazion Date: Fri, 19 May 2017 16:40:36 -0500 Subject: [PATCH] search: readd posts.id secondary sort to order: metatags. --- app/logical/post_query_builder.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/logical/post_query_builder.rb b/app/logical/post_query_builder.rb index f96544f74..552324017 100644 --- a/app/logical/post_query_builder.rb +++ b/app/logical/post_query_builder.rb @@ -392,28 +392,28 @@ class PostQueryBuilder relation = relation.order("posts.id DESC") when "score", "score_desc" - relation = relation.order("posts.score DESC") + relation = relation.order("posts.score DESC, posts.id DESC") when "score_asc" - relation = relation.order("posts.score ASC") + relation = relation.order("posts.score ASC, posts.id ASC") when "favcount" - relation = relation.order("posts.fav_count DESC") + relation = relation.order("posts.fav_count DESC, posts.id DESC") when "favcount_asc" - relation = relation.order("posts.fav_count ASC") + relation = relation.order("posts.fav_count ASC, posts.id ASC") when "change", "change_desc" - relation = relation.order("posts.updated_at DESC") + relation = relation.order("posts.updated_at DESC, posts.id DESC") when "change_asc" - relation = relation.order("posts.updated_at ASC") + relation = relation.order("posts.updated_at ASC, posts.id ASC") when "comment", "comm" - relation = relation.order("posts.last_commented_at DESC NULLS LAST") + 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 LAST") + relation = relation.order("posts.last_commented_at ASC NULLS LAST, posts.id ASC") when "comment_bumped" relation = relation.order("posts.last_comment_bumped_at DESC NULLS LAST")