From 7c9dd80d3511e95ce1ac41241236a4d3f4cb5a0a Mon Sep 17 00:00:00 2001 From: BrokenEagle Date: Thu, 28 Dec 2017 12:16:44 -0800 Subject: [PATCH] Fix status:active so that it doesn't show flagged posts --- app/logical/post_query_builder.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/logical/post_query_builder.rb b/app/logical/post_query_builder.rb index b1a24af42..73cac2e4a 100644 --- a/app/logical/post_query_builder.rb +++ b/app/logical/post_query_builder.rb @@ -137,7 +137,7 @@ class PostQueryBuilder elsif q[:status] == "banned" relation = relation.where("posts.is_banned = TRUE") elsif q[:status] == "active" - relation = relation.where("posts.is_pending = FALSE AND posts.is_deleted = FALSE AND posts.is_banned = FALSE") + relation = relation.where("posts.is_pending = FALSE AND posts.is_deleted = FALSE AND posts.is_banned = FALSE AND posts.is_flagged = FALSE") elsif q[:status] == "all" || q[:status] == "any" # do nothing elsif q[:status_neg] == "pending" @@ -149,7 +149,7 @@ class PostQueryBuilder elsif q[:status_neg] == "banned" relation = relation.where("posts.is_banned = FALSE") elsif q[:status_neg] == "active" - relation = relation.where("posts.is_pending = TRUE OR posts.is_deleted = TRUE OR posts.is_banned = TRUE") + relation = relation.where("posts.is_pending = TRUE OR posts.is_deleted = TRUE OR posts.is_banned = TRUE OR posts.is_flagged = TRUE") end if hide_deleted_posts?(q)