mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 03:33:58 -06:00
Merge pull request #1890 from vikhyat/hidden-category-fix
ignore exclude_category from the menu if we are trying to view the category
This commit is contained in:
commit
5958e710c0
@ -199,9 +199,9 @@ class ListController < ApplicationController
|
||||
end
|
||||
|
||||
def build_topic_list_options
|
||||
# html format means we need to parse exclude category (aka filter) from the site options top menu
|
||||
menu_items = SiteSetting.top_menu_items
|
||||
menu_item = menu_items.select { |item| item.query_should_exclude_category?(action_name) }.first
|
||||
menu_item = nil if menu_item.try(:filter).try(:parameterize) == params[:category]
|
||||
|
||||
# exclude_category = 1. from params / 2. parsed from top menu / 3. nil
|
||||
options = {
|
||||
|
Loading…
Reference in New Issue
Block a user