search: add status:modqueue, status:unmoderated metatags.
* status:modqueue = ~status:pending ~status:flagged * status:unmoderated = status:modqueue -user:self -approver:self -disapproval:any
This commit is contained in:
@@ -131,18 +131,24 @@ class PostQueryBuilder
|
||||
relation = relation.where("posts.is_pending = TRUE")
|
||||
elsif q[:status] == "flagged"
|
||||
relation = relation.where("posts.is_flagged = TRUE")
|
||||
elsif q[:status] == "modqueue"
|
||||
relation = relation.where("posts.is_pending = TRUE OR 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] == "active"
|
||||
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] == "unmoderated"
|
||||
relation = relation.merge(Post.pending_or_flagged.available_for_moderation)
|
||||
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] == "modqueue"
|
||||
relation = relation.where("posts.is_pending = FALSE AND posts.is_flagged = FALSE")
|
||||
elsif q[:status_neg] == "deleted"
|
||||
relation = relation.where("posts.is_deleted = FALSE")
|
||||
elsif q[:status_neg] == "banned"
|
||||
|
||||
Reference in New Issue
Block a user