aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Page.pm
diff options
context:
space:
mode:
authorEdmund von der Burg <evdb@mysociety.org>2011-04-08 14:36:01 +0100
committerEdmund von der Burg <evdb@mysociety.org>2011-04-08 14:36:01 +0100
commit6b887cac626dfa0802051cc898a75c36e5c55b4f (patch)
tree60ae7a03624bdfaa839023a528e8c9f16093f65c /perllib/Page.pm
parent6f8a067e57fc6dcd7cf8ff3184af12d37ad85810 (diff)
parentcf984198252ed545d924985ddeadaae506087ea6 (diff)
Merge branch 'master' into migrate_to_catalyst
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 391926b4f..b2e579888 100644
--- a/perllib/Page.pm
+++ b/perllib/Page.pm
@@ -606,12 +606,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 {