diff --git a/app/models/category_list.rb b/app/models/category_list.rb index 6f445feaa1..642a18643d 100644 --- a/app/models/category_list.rb +++ b/app/models/category_list.rb @@ -145,15 +145,9 @@ class CategoryList end - # Remove any empty categories unless we can create them (so we can see the controls) def prune_empty - if !@guardian.can_create?(Category) - # Remove categories with no featured topics unless we have the ability to edit one - @categories.delete_if do |c| - c.displayable_topics.blank? && c.description.blank? - end - elsif !SiteSetting.allow_uncategorized_topics - # Don't show uncategorized to admins either, if uncategorized topics are not allowed + if @guardian.can_create?(Category) && !SiteSetting.allow_uncategorized_topics + # HACK: Don't show uncategorized to admins either, if uncategorized topics are not allowed # and there are none. @categories.delete_if do |c| c.uncategorized? && c.displayable_topics.blank?