From 8cc05f5ef6888b7770c6ea33fe79a251b7d7fc4d Mon Sep 17 00:00:00 2001 From: r888888888 Date: Fri, 26 Jul 2013 16:50:42 -0700 Subject: [PATCH] fixes #1729 --- app/logical/post_query_builder.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/logical/post_query_builder.rb b/app/logical/post_query_builder.rb index 9fdeb3bd2..8065305bc 100644 --- a/app/logical/post_query_builder.rb +++ b/app/logical/post_query_builder.rb @@ -276,8 +276,6 @@ class PostQueryBuilder if q[:order] == "rank" relation = relation.where("posts.score > 0 and posts.created_at >= ?", 2.days.ago) - elsif q[:order] == "rank2" - relation = relation.where("posts.fav_count > 0 and posts.created_at >= ?", 2.days.ago) elsif q[:order] == "landscape" || q[:order] == "portrait" relation = relation.where("posts.image_width IS NOT NULL and posts.image_height IS NOT NULL") end @@ -336,9 +334,6 @@ class PostQueryBuilder when "rank" relation = relation.order("log(3, posts.score) + (extract(epoch from posts.created_at) - extract(epoch from timestamp '2005-05-24')) / 45000 DESC") - when "rank2" - relation = relation.order("log(3, posts.fav_count) + (extract(epoch from posts.created_at) - extract(epoch from timestamp '2005-05-24')) / 45000 DESC") - else relation = relation.order("posts.id DESC") end