mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Revert "Revert "FEATURE: Can create warnings for users via PM""
This reverts commit 1c7559380c
.
This commit is contained in:
parent
1c7559380c
commit
334e21a03a
37 changed files with 243 additions and 18 deletions
|
@ -165,7 +165,7 @@ class TopicQuery
|
|||
options.reverse_merge!(per_page: SiteSetting.topics_per_page)
|
||||
|
||||
# Start with a list of all topics
|
||||
result = Topic.includes(:allowed_users)
|
||||
result = Topic.includes(:allowed_users).includes(:warning)
|
||||
.where("topics.id IN (SELECT topic_id FROM topic_allowed_users WHERE user_id = #{user.id.to_i})")
|
||||
.joins("LEFT OUTER JOIN topic_users AS tu ON (topics.id = tu.topic_id AND tu.user_id = #{user.id.to_i})")
|
||||
.order(TopicQuerySQL.order_nocategory_basic_bumped)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue