mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Modal for profile featured topic & admin wrench refactor (#8545)
This commit is contained in:
committed by
GitHub
parent
7b6bafc651
commit
8c4ffaea1b
@@ -303,6 +303,14 @@ class Search
|
||||
posts.where('topics.closed')
|
||||
end
|
||||
|
||||
advanced_filter(/^status:public$/) do |posts|
|
||||
category_ids = Category
|
||||
.where(read_restricted: false)
|
||||
.pluck(:id)
|
||||
|
||||
posts.where("topics.category_id in (?)", category_ids)
|
||||
end
|
||||
|
||||
advanced_filter(/^status:archived$/) do |posts|
|
||||
posts.where('topics.archived')
|
||||
end
|
||||
@@ -370,6 +378,10 @@ class Search
|
||||
posts.where("posts.user_id = #{@guardian.user.id}") if @guardian.user
|
||||
end
|
||||
|
||||
advanced_filter(/^in:created$/) do |posts|
|
||||
posts.where(user_id: @guardian.user.id, post_number: 1) if @guardian.user
|
||||
end
|
||||
|
||||
advanced_filter(/^in:(watching|tracking)$/) do |posts, match|
|
||||
if @guardian.user
|
||||
level = TopicUser.notification_levels[match.to_sym]
|
||||
|
||||
Reference in New Issue
Block a user