mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 02:58:48 +08:00
TWEAK: Don't show subcategory topic definitions when viewing a category list.
This commit is contained in:
@ -238,7 +238,7 @@ class TopicQuery
|
||||
if options[:no_subcategories]
|
||||
result = result.where('categories.id = ?', category_id)
|
||||
else
|
||||
result = result.where('categories.id = ? or categories.parent_category_id = ?', category_id, category_id)
|
||||
result = result.where('categories.id = ? or (categories.parent_category_id = ? AND categories.topic_id <> topics.id)', category_id, category_id)
|
||||
end
|
||||
result = result.references(:categories)
|
||||
end
|
||||
|
Reference in New Issue
Block a user