diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2015-09-01 10:07:30 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-09-03 16:14:18 +0100 |
commit | 8544bafc365406ac9a403e80fe07cc361a7d1d5b (patch) | |
tree | da90a4a20c9f3d653335b3c8369b900211b47dd0 /perllib/FixMyStreet/App/Controller/Rss.pm | |
parent | 8ef9368785c1950ae0aea8c13584288d395662d6 (diff) |
Use base URL in cobrand alert for no-body report.
If a cobrand has a body restriction, then a report without any body
won't be shown on it, so we need to make sure links to the report (in
email alerts and RSS) are to the base URL, not the cobrand.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Rss.pm')
-rwxr-xr-x | perllib/FixMyStreet/App/Controller/Rss.pm | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm index b58b79937..b817fe326 100755 --- a/perllib/FixMyStreet/App/Controller/Rss.pm +++ b/perllib/FixMyStreet/App/Controller/Rss.pm @@ -264,11 +264,7 @@ 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->body_restriction; - my $base_url = $c->cobrand->base_url; - if ( $hashref_restriction && $row->{bodies_str} && $row->{bodies_str} ne $hashref_restriction ) { - $base_url = $c->config->{BASE_URL}; - } + my $base_url = $c->cobrand->base_url_for_report($row); my $url = $base_url . $link; my %item = ( |