Fix 'Deleted post filter' option applying to status:{any,all} (#3245).

https://danbooru.donmai.us/forum_topics/9127?page=196#forum_post_134342
This commit is contained in:
evazion
2017-08-04 17:15:39 -05:00
parent a56c1bbb76
commit 7b96d9dcd4

View File

@@ -86,10 +86,9 @@ class PostQueryBuilder
def hide_deleted_posts?(q)
return false if CurrentUser.admin_mode?
return false if !CurrentUser.user.hide_deleted_posts?
return false if q[:status].in?(%w[deleted active])
return false if q[:status_neg].in?(%w[deleted active])
return true
return false if q[:status].in?(%w[deleted active any all])
return false if q[:status_neg].in?(%w[deleted active any all])
return CurrentUser.user.hide_deleted_posts?
end
def build(relation = nil)