Use a site setting for maximum summary results
This commit is contained in:
parent
3eb020c466
commit
f47ab30b04
|
@ -240,7 +240,7 @@ class Post < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.summary
|
def self.summary
|
||||||
where(["(post_number = 1) or (percent_rank <= ?)", SiteSetting.summary_percent_filter.to_f / 100.0]).limit(100)
|
where(["(post_number = 1) or (percent_rank <= ?)", SiteSetting.summary_percent_filter.to_f / 100.0]).limit(SiteSetting.summary_max_results)
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_flagged_posts_count
|
def update_flagged_posts_count
|
||||||
|
|
|
@ -695,6 +695,8 @@ en:
|
||||||
summary_posts_required: "Minimum posts in a topic before 'Summarize This Topic' is enabled"
|
summary_posts_required: "Minimum posts in a topic before 'Summarize This Topic' is enabled"
|
||||||
summary_likes_required: "Minimum likes in a topic before 'Summarize This Topic' is enabled"
|
summary_likes_required: "Minimum likes in a topic before 'Summarize This Topic' is enabled"
|
||||||
summary_percent_filter: "When a user clicks 'Summarize This Topic', show the top % of posts"
|
summary_percent_filter: "When a user clicks 'Summarize This Topic', show the top % of posts"
|
||||||
|
summary_max_results: "Maximum posts returned by 'Summary This Topic'"
|
||||||
|
|
||||||
enable_private_messages: "Allow trust level 1 users to create private messages and reply to private messages"
|
enable_private_messages: "Allow trust level 1 users to create private messages and reply to private messages"
|
||||||
|
|
||||||
enable_long_polling: "Message bus used for notification can use long polling"
|
enable_long_polling: "Message bus used for notification can use long polling"
|
||||||
|
|
|
@ -713,6 +713,7 @@ uncategorized:
|
||||||
summary_posts_required: 50
|
summary_posts_required: 50
|
||||||
summary_likes_required: 1
|
summary_likes_required: 1
|
||||||
summary_percent_filter: 20
|
summary_percent_filter: 20
|
||||||
|
summary_max_results: 100
|
||||||
|
|
||||||
# View heat thresholds
|
# View heat thresholds
|
||||||
topic_views_heat_low:
|
topic_views_heat_low:
|
||||||
|
|
Loading…
Reference in New Issue