aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Page.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@fury.ukcod.org.uk>2011-04-08 13:50:09 +0100
committerMatthew Somerville <matthew@fury.ukcod.org.uk>2011-04-08 13:50:09 +0100
commit109b355d511098de2f8ff630ab530caa3c6eb6f5 (patch)
tree5ca9021c8e94d8f55de0ca97f179f544abd78244 /perllib/Page.pm
parent56bbdf2268b04dc6afa212d3c6bcd117a327ceac (diff)
parentab818265ab3eeaa226ce94288f7e6c286d2a28db (diff)
Merge branch 'london'
Diffstat (limited to 'perllib/Page.pm')
-rw-r--r--perllib/Page.pm15
1 files changed, 10 insertions, 5 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm
index 24c52885a..e659c0af5 100644
--- a/perllib/Page.pm
+++ b/perllib/Page.pm
@@ -578,12 +578,17 @@ sub display_problem_meta_line($$) {
$out .= '; ' . _('the map was not used so pin location may be inaccurate') unless ($problem->{used_map});
if ($problem->{council}) {
if ($problem->{whensent}) {
- $problem->{council} =~ s/\|.*//g;
- my @councils = split /,/, $problem->{council};
- my $areas_info = mySociety::MaPit::call('areas', \@councils);
- my $council = join(' and ', map { $areas_info->{$_}->{name} } @councils);
+ my $body;
+ if ($problem->{external_body}) {
+ $body = $problem->{external_body};
+ } else {
+ $problem->{council} =~ s/\|.*//g;
+ my @councils = split /,/, $problem->{council};
+ my $areas_info = mySociety::MaPit::call('areas', \@councils);
+ $body = join(' and ', map { $areas_info->{$_}->{name} } @councils);
+ }
$out .= '<small class="council_sent_info">';
- $out .= $q->br() . sprintf(_('Sent to %s %s later'), $council, prettify_duration($problem->{whensent}, 'minute'));
+ $out .= $q->br() . sprintf(_('Sent to %s %s later'), $body, prettify_duration($problem->{whensent}, 'minute'));
$out .= '</small>';
}
} else {