posts: remove sidebar for banned searches.

This commit is contained in:
evazion
2022-10-05 01:25:26 -05:00
parent 24216379b7
commit b4a67331ce
2 changed files with 7 additions and 4 deletions

View File

@@ -112,6 +112,7 @@ module PostSets
# @return [Integer, nil] The number of posts returned by the search, or nil if unknown.
def post_count
return 0 if artist.present? && artist.is_banned? && !current_user.is_approver?
normalized_query.post_count
end
@@ -161,7 +162,9 @@ module PostSets
concerning :TagListMethods do
def related_tags
if normalized_query.wildcards.one? && normalized_query.tags.none?
if artist.present? && artist.is_banned? && !current_user.is_approver?
[]
elsif normalized_query.wildcards.one? && normalized_query.tags.none?
wildcard_tags
elsif normalized_query.is_metatag?(:search)
saved_search_tags