fix for #1047
This commit is contained in:
@@ -141,9 +141,11 @@ class PostQueryBuilder
|
|||||||
relation = relation.where("posts.is_deleted = TRUE")
|
relation = relation.where("posts.is_deleted = TRUE")
|
||||||
elsif q[:status] == "banned"
|
elsif q[:status] == "banned"
|
||||||
relation = relation.where("posts.is_banned = TRUE")
|
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")
|
||||||
elsif q[:status] == "all" || q[:status] == "any"
|
elsif q[:status] == "all" || q[:status] == "any"
|
||||||
# do nothing
|
# do nothing
|
||||||
elsif q[:status_neg] == "pending" || q[:status] == "active"
|
elsif q[:status_neg] == "pending"
|
||||||
relation = relation.where("posts.is_pending = FALSE")
|
relation = relation.where("posts.is_pending = FALSE")
|
||||||
elsif q[:status_neg] == "flagged"
|
elsif q[:status_neg] == "flagged"
|
||||||
relation = relation.where("posts.is_flagged = FALSE")
|
relation = relation.where("posts.is_flagged = FALSE")
|
||||||
|
|||||||
Reference in New Issue
Block a user