FEATURE: remove support for 'suppress_from_latest' category setting. (#8308)

This commit is contained in:
Vinoth Kannan
2019-11-18 12:28:35 +05:30
committed by GitHub
parent 4e4844f4db
commit 3bb7ad4be1
20 changed files with 64 additions and 182 deletions

View File

@ -28,8 +28,7 @@ class TopicQuery
{
max_posts: zero_up_to_max_int,
min_posts: zero_up_to_max_int,
page: zero_up_to_max_int,
exclude_category_ids: array_int_or_int
page: zero_up_to_max_int
}
end
end
@ -49,7 +48,6 @@ class TopicQuery
before
bumped_before
topic_ids
exclude_category_ids
category
order
ascending
@ -756,10 +754,6 @@ class TopicQuery
result = apply_ordering(result, options)
result = result.listable_topics
if options[:exclude_category_ids] && options[:exclude_category_ids].is_a?(Array) && options[:exclude_category_ids].size > 0
result = result.where("categories.id NOT IN (?)", options[:exclude_category_ids].map(&:to_i)).references(:categories)
end
# Don't include the category topics if excluded
if options[:no_definitions]
result = result.where('COALESCE(categories.topic_id, 0) <> topics.id')