This commit is contained in:
albert
2013-03-23 11:49:25 -04:00
parent d0cc68ecb7
commit 0cfaed99e0
3 changed files with 16 additions and 1 deletions

View File

@@ -137,8 +137,16 @@ class PostQueryBuilder
relation = relation.where("posts.is_flagged = TRUE")
elsif q[:status] == "deleted"
relation = relation.where("posts.is_deleted = TRUE")
elsif q[:status] == "banned"
relation = relation.where("posts.is_banned = TRUE")
elsif q[:status] == "all" || q[:status] == "any"
# do nothing
elsif q[:status_neg] == "pending"
relation = relation.where("posts.is_pending = FALSE")
elsif q[:status_neg] == "flagged"
relation = relation.where("posts.is_flagged = FALSE")
elsif q[:status_neg] == "deleted"
relation = relation.where("posts.is_deleted = FALSE")
end
if q[:source]