aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/general-example3
-rw-r--r--perllib/FixMyStreet/Alert.pm3
2 files changed, 5 insertions, 1 deletions
diff --git a/conf/general-example b/conf/general-example
index b19a6a6bb..7e750de96 100644
--- a/conf/general-example
+++ b/conf/general-example
@@ -74,4 +74,7 @@ define('OPTION_HTTPD_ERROR_LOG', '/var/log/apache/error.log');
define('OPTION_ALLOWED_COBRANDS', 'cobrand_one|cobrand_two');
+// How many items are returned in the GeoRSS feeds by default
+define('OPTION_RSS_LIMIT', '20');
+
?>
diff --git a/perllib/FixMyStreet/Alert.pm b/perllib/FixMyStreet/Alert.pm
index 11ede31ca..15981acc5 100644
--- a/perllib/FixMyStreet/Alert.pm
+++ b/perllib/FixMyStreet/Alert.pm
@@ -263,7 +263,8 @@ sub generate_rss ($$$;$$$$) {
. ($alert_type->{head_table} ? $alert_type->{head_table}.'_id=? and ' : '')
. $alert_type->{item_where} . $site_restriction . ' order by '
. $alert_type->{item_order};
- $query .= ' limit 20' unless $type =~ /^all/;
+ my $rss_limit = mySociety::Config::get('RSS_LIMIT');
+ $query .= " limit $rss_limit" unless $type =~ /^all/;
$q = dbh()->prepare($query);
if ($query =~ /\?/) {
throw FixMyStreet::Alert::Error('Missing parameter') unless @$db_params;