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:
Régis Hanol 2014-01-31 20:54:16 -08:00
commit 5958e710c0

View File

@ -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 = {