search: fix status:any not working when hide_deleted_posts is on.

ref: https://danbooru.donmai.us/forum_topics/9127?page=303#forum_post_165694
This commit is contained in:
evazion
2020-04-23 20:49:53 -05:00
parent cacc32740c
commit 009b5ad84c
2 changed files with 17 additions and 3 deletions

View File

@@ -324,8 +324,8 @@ class PostQueryBuilder
def hide_deleted_posts?(q)
return false if CurrentUser.admin_mode?
return false if q[:status].to_a.any?(%w[deleted active any all])
return false if q[:status_neg].to_a.any?(%w[deleted active any all])
return false if find_metatag("status").to_s.downcase.in?(%w[deleted active any all])
return false if find_metatag("-status").to_s.downcase.in?(%w[deleted active any all])
return CurrentUser.user.hide_deleted_posts?
end