Max out summary filter at 100 posts.

This commit is contained in:
Robin Ward 2014-10-28 15:58:04 -04:00
parent edea7180f4
commit 3eb020c466
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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