mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 05:53:52 +08:00
FIX: enabling suppress_from_homepage should only remove the category from the homepage
This commit is contained in:
@ -54,15 +54,17 @@ class ListController < ApplicationController
|
||||
list_opts.merge!(options) if options
|
||||
user = list_target_user
|
||||
|
||||
if filter == :latest && params[:category].blank?
|
||||
list_opts[:no_definitions] = true
|
||||
end
|
||||
|
||||
if filter.to_s == current_homepage
|
||||
list_opts.merge!(exclude_category_ids: get_excluded_category_ids(list_opts[:category]))
|
||||
if params[:category].blank?
|
||||
if filter == :latest
|
||||
list_opts[:no_definitions] = true
|
||||
end
|
||||
if filter.to_s == current_homepage
|
||||
list_opts[:exclude_category_ids] = get_excluded_category_ids(list_opts[:category])
|
||||
end
|
||||
end
|
||||
|
||||
list = TopicQuery.new(user, list_opts).public_send("list_#{filter}")
|
||||
|
||||
list.more_topics_url = construct_url_with(:next, list_opts)
|
||||
list.prev_topics_url = construct_url_with(:prev, list_opts)
|
||||
if Discourse.anonymous_filters.include?(filter)
|
||||
@ -165,7 +167,7 @@ class ListController < ApplicationController
|
||||
top_options[:per_page] = SiteSetting.topics_per_period_in_top_page
|
||||
|
||||
if "top".freeze == current_homepage
|
||||
top_options.merge!(exclude_category_ids: get_excluded_category_ids(top_options[:category]))
|
||||
top_options[:exclude_category_ids] = get_excluded_category_ids(top_options[:category])
|
||||
end
|
||||
|
||||
user = list_target_user
|
||||
|
Reference in New Issue
Block a user