aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Rss.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2015-08-17 17:12:26 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2015-08-19 15:47:20 +0100
commit5c79337ad423cd7fc3cada9b7830d90726387987 (patch)
tree61615747eae7483722bea4c94309ef4d1cddac4c /perllib/FixMyStreet/App/Controller/Rss.pm
parentf5d6ec933c9fd4d57f9b56fec27f7c746a0706b9 (diff)
Simplify/consolidate body restriction db code.
Make dashboard work properly in two-tier councils, showing reports sent to both. Create an index on the array of the bodies_str column to speed up performance, and use that throughout the code replacing all LIKE scans. This also enables a simplifying tidy of the restriction code.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Rss.pm')
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Rss.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm
index 7aafc99ff..b58b79937 100755
--- a/perllib/FixMyStreet/App/Controller/Rss.pm
+++ b/perllib/FixMyStreet/App/Controller/Rss.pm
@@ -264,9 +264,9 @@ sub add_row : Private {
(my $link = $alert_type->item_link) =~ s/{{(.*?)}}/$row->{$1}/g;
(my $desc = _($alert_type->item_description)) =~ s/{{(.*?)}}/$row->{$1}/g;
- my $hashref_restriction = $c->cobrand->site_restriction;
+ my $hashref_restriction = $c->cobrand->body_restriction;
my $base_url = $c->cobrand->base_url;
- if ( $hashref_restriction && $hashref_restriction->{bodies_str} && $row->{bodies_str} && $row->{bodies_str} ne $hashref_restriction->{bodies_str} ) {
+ if ( $hashref_restriction && $row->{bodies_str} && $row->{bodies_str} ne $hashref_restriction ) {
$base_url = $c->config->{BASE_URL};
}
my $url = $base_url . $link;