mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
hard code best requires trust level > 0, make it configurable later
This commit is contained in:
parent
dca216ed54
commit
5e7ffd830e
@ -180,6 +180,7 @@ class TopicView
|
|||||||
@index_offset = 0
|
@index_offset = 0
|
||||||
@posts = @filtered_posts.order('percent_rank asc, sort_order asc').where("post_number > 1")
|
@posts = @filtered_posts.order('percent_rank asc, sort_order asc').where("post_number > 1")
|
||||||
@posts = @posts.includes(:reply_to_user).includes(:topic).joins(:user).limit(max)
|
@posts = @posts.includes(:reply_to_user).includes(:topic).joins(:user).limit(max)
|
||||||
|
@posts = @posts.where('COALESCE(users.trust_level,0) > 0')
|
||||||
@posts = @posts.to_a
|
@posts = @posts.to_a
|
||||||
@posts.sort!{|a,b| a.post_number <=> b.post_number}
|
@posts.sort!{|a,b| a.post_number <=> b.post_number}
|
||||||
@posts
|
@posts
|
||||||
|
Loading…
x
Reference in New Issue
Block a user