diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2012-07-10 12:38:36 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2012-07-10 12:38:36 +0100 |
commit | 73da8428283e6830265f82af522d31c1321f3981 (patch) | |
tree | b72000250bd99feb20633a36f4e12107c6c75da3 /perllib/FixMyStreet/DB/Result/Problem.pm | |
parent | 748391146a53c061e3ae79a76a510635b002c052 (diff) |
Allow report URL to be cobrand-specific (for places where cobrand links to a report that isn't covered by it).
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index 9cbaef6c2..4af6f80cd 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -551,9 +551,8 @@ sub body { if ($problem->external_body) { $body = $problem->external_body; } else { - (my $council = $problem->council) =~ s/\|.*//g; - my @councils = split( /,/, $council ); - my $areas_info = mySociety::MaPit::call('areas', \@councils); + my $councils = $problem->councils; + my $areas_info = mySociety::MaPit::call('areas', $councils); $body = join( _(' and '), map { my $name = $areas_info->{$_}->{name}; @@ -564,7 +563,7 @@ sub body { } else { $name; } - } @councils + } @$councils ); } return $body; |