mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 03:18:23 +00:00
Max out summary filter at 100 posts.
This commit is contained in:
parent
edea7180f4
commit
3eb020c466
@ -240,7 +240,7 @@ class Post < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.summary
|
||||
where(["(post_number = 1) or (percent_rank <= ?)", SiteSetting.summary_percent_filter.to_f / 100.0])
|
||||
where(["(post_number = 1) or (percent_rank <= ?)", SiteSetting.summary_percent_filter.to_f / 100.0]).limit(100)
|
||||
end
|
||||
|
||||
def update_flagged_posts_count
|
||||
|
@ -404,7 +404,7 @@ class TopicView
|
||||
closest_posts = filter_post_ids_by("@(post_number - #{post_number})")
|
||||
return nil if closest_posts.empty?
|
||||
|
||||
filtered_post_ids.index(closest_posts.first)
|
||||
filtered_post_ids.index(closest_posts.first) || filtered_post_ids[0]
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user