aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Rss.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-07-06 12:10:46 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-07-06 12:10:46 +0100
commit842ff2b00f4924f8580710c977ccce7bef33b0c2 (patch)
treee2ab4fda5a811b214fb4f501208f98f07a2c3c41 /perllib/FixMyStreet/App/Controller/Rss.pm
parentdeb369669b540f607e435390f4606b927569dded (diff)
Factor out the SQL restriction from site_restriction, as it's only used in one place.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Rss.pm')
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Rss.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm
index 4d0b6cb93..f898d06a0 100755
--- a/perllib/FixMyStreet/App/Controller/Rss.pm
+++ b/perllib/FixMyStreet/App/Controller/Rss.pm
@@ -205,14 +205,14 @@ sub query_main : Private {
my ( $self, $c ) = @_;
my $alert_type = $c->stash->{alert_type};
- my ( $site_restriction, $site_id ) = $c->cobrand->site_restriction( $c->cobrand->extra_data );
+ my ( $sql_restriction ) = $c->cobrand->sql_restriction( $c->cobrand->extra_data );
# Only apply a site restriction if the alert uses the problem table
- $site_restriction = '' unless $alert_type->item_table eq 'problem';
+ $sql_restriction = '' unless $alert_type->item_table eq 'problem';
# FIXME Do this in a nicer way at some point in the future...
my $query = 'select * from ' . $alert_type->item_table . ' where '
. ($alert_type->head_table ? $alert_type->head_table . '_id=? and ' : '')
- . $alert_type->item_where . $site_restriction . ' order by '
+ . $alert_type->item_where . $sql_restriction . ' order by '
. $alert_type->item_order;
my $rss_limit = mySociety::Config::get('RSS_LIMIT');
$query .= " limit $rss_limit" unless $c->stash->{type} =~ /^all/;