aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@fury.ukcod.org.uk>2011-04-19 13:16:07 +0100
committerMatthew Somerville <matthew@fury.ukcod.org.uk>2011-04-19 13:16:07 +0100
commitc016d4f9f18a41755a5a4774811deb9fd0064466 (patch)
tree1aa5949599e1be29bc7343dd0cd7e9743365ecdb
parent71b8024907c28e5bb3c633a1d801cd1c2a40e465 (diff)
parent6f35b0595c8d50f66817d526a164a6f6b543a058 (diff)
Merge commit 'petter/custom_rss_limit'
-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;