mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:11:08 +08:00
Internal renaming of elder,leader,regular,basic to numbers
Changed internals so trust levels are referred to with TrustLevel[1], TrustLevel[2] etc. This gives us much better flexibility naming trust levels, these names are meant to be controlled by various communities.
This commit is contained in:
@ -94,7 +94,7 @@ class TopicQuery
|
||||
score = "#{period}_score"
|
||||
create_list(:top, unordered: true) do |topics|
|
||||
topics = topics.joins(:top_topic).where("top_topics.#{score} > 0")
|
||||
if period == :yearly && @user.try(:trust_level) == TrustLevel.levels[:newuser]
|
||||
if period == :yearly && @user.try(:trust_level) == TrustLevel[0]
|
||||
topics.order(TopicQuerySQL.order_top_with_pinned_category_for(score))
|
||||
else
|
||||
topics.order(TopicQuerySQL.order_top_for(score))
|
||||
|
Reference in New Issue
Block a user