BUGFIX: ensured logged in wasn't listing all anonymous filters

This commit is contained in:
Régis Hanol 2014-04-04 10:05:40 -07:00
parent d91a72a791
commit e7601db730

View file

@ -27,11 +27,23 @@ class ListController < ApplicationController
# anonymous filters
Discourse.anonymous_filters,
Discourse.anonymous_filters.map { |f| "#{f}_feed".to_sym },
# categories
@@categories,
# top
# anonymous categorized filters
Discourse.anonymous_filters.map { |f| "category_#{f}".to_sym },
Discourse.anonymous_filters.map { |f| "category_none_#{f}".to_sym },
Discourse.anonymous_filters.map { |f| "parent_category_category_#{f}".to_sym },
Discourse.anonymous_filters.map { |f| "parent_category_category_none_#{f}".to_sym },
# category feeds
:category_feed,
# top summaries
:top,
TopTopic.periods.map { |p| "top_#{p}".to_sym }
:category_top,
:category_none_top,
:parent_category_category_top,
# top pages (ie. with a period)
TopTopic.periods.map { |p| "top_#{p}".to_sym },
TopTopic.periods.map { |p| "category_top_#{p}".to_sym },
TopTopic.periods.map { |p| "category_none_top_#{p}".to_sym },
TopTopic.periods.map { |p| "parent_category_category_top_#{p}".to_sym },
].flatten
# Create our filters