diff options
Diffstat (limited to 'web')
-rwxr-xr-x | web/index.cgi | 10 | ||||
-rwxr-xr-x | web/report.cgi | 11 |
2 files changed, 11 insertions, 10 deletions
diff --git a/web/index.cgi b/web/index.cgi index 64780eb40..083bd5644 100755 --- a/web/index.cgi +++ b/web/index.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: index.cgi,v 1.126 2007-05-09 16:16:59 matthew Exp $ +# $Id: index.cgi,v 1.127 2007-05-09 20:07:01 matthew Exp $ use strict; require 5.8.0; @@ -367,7 +367,7 @@ EOF if ($details eq 'all') { $out .= '<p>All the details you provide here will be sent to <strong>' - . join('</strong> or <strong>', map { $areas_info->{$_}->{name} } @$all_councils) + . join('</strong> or <strong>', map { Page::canonicalise_council($areas_info->{$_}->{name}) } @$all_councils) . '</strong>. We show the subject and details of the problem on the site, along with your name if you give us permission.</p>'; $out .= '<input type="hidden" name="council" value="' . join(',',@$all_councils) . '">'; @@ -379,9 +379,9 @@ EOF push @missing, $_ unless $councils{$_}; } my $n = @missing; - my $list = join(' or ', map { $areas_info->{$_}->{name} } @missing); + my $list = join(' or ', map { Page::canonicalise_council($areas_info->{$_}->{name}) } @missing); $out .= '<p>All the details you provide here will be sent to <strong>' - . join('</strong> or <strong>', map { $areas_info->{$_}->{name} } @councils) + . join('</strong> or <strong>', map { Page::canonicalise_council($areas_info->{$_}->{name}) } @councils) . '</strong>. We show the subject and details of the problem on the site, along with your name if you give us permission.</p>'; $out .= ' We do <strong>not</strong> yet have details for the other council'; @@ -392,7 +392,7 @@ problems for $list and emailing it to us at <a href='mailto:$e'>$e</a>.</p>"; . '|' . join(',', @missing) . '">'; } else { my $e = mySociety::Config::get('CONTACT_EMAIL'); - my $list = join(' or ', map { $areas_info->{$_}->{name} } @$all_councils); + my $list = join(' or ', map { Page::canonicalise_council($areas_info->{$_}->{name}) } @$all_councils); my $n = @$all_councils; $out .= '<p>We do not yet have details for the council'; $out .= ($n>1) ? 's that cover' : ' that covers'; diff --git a/web/report.cgi b/web/report.cgi index 39f3a621e..8321a4935 100755 --- a/web/report.cgi +++ b/web/report.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: report.cgi,v 1.19 2007-05-09 19:59:04 matthew Exp $ +# $Id: report.cgi,v 1.20 2007-05-09 20:07:01 matthew Exp $ use strict; require 5.8.0; @@ -78,8 +78,9 @@ sub main { print '<table>'; print '<tr><th>Name</th><th>New problems</th><th>Old problems, still present</th> <th>Old problems, state unknown</th><th>Recently fixed</th><th>Old fixed</th></tr>'; - foreach (sort { $areas_info->{$a}->{name} cmp $areas_info->{$b}->{name} } keys %councils) { - print '<tr><td><a href="report?council=' . $_ . '">' . $areas_info->{$_}->{name} . '</a></td>'; + foreach (sort { Page::canonicalise_council($areas_info->{$a}->{name}) cmp Page::canonicalise_council($areas_info->{$b}->{name}) } keys %councils) { + print '<tr><td><a href="report?council=' . $_ . '">' . + Page::canonicalise_council($areas_info->{$_}->{name}) . '</a></td>'; summary_cell(\@{$open{$_}{new}{new}}); summary_cell(\@{$open{$_}{old}{new}}); summary_cell(\@{$open{$_}{old}{old}}); @@ -94,8 +95,8 @@ sub main { ' or go back and ' . $q->a({href => NewURL($q, all=>undef, council=>undef) }, 'show all councils') . '.'); - foreach (sort { $areas_info->{$a}->{name} cmp $areas_info->{$b}->{name} } keys %councils) { - print '<h2>' . $areas_info->{$_}->{name} . "</h2>\n"; + foreach (sort { Page::canonicalise_council($areas_info->{$a}->{name}) cmp Page::canonicalise_council($areas_info->{$b}->{name}) } keys %councils) { + print '<h2>' . Page::canonicalise_council($areas_info->{$_}->{name}) . "</h2>\n"; list_problems('New problems', $open{$_}{new}{new}, $all) if $open{$_}{new}{new}; list_problems('Old problems, still present', $open{$_}{old}{new}, $all) if $open{$_}{old}{new}; list_problems('Old problems, state unknown', $open{$_}{old}{old}, $all) if $open{$_}{old}{old}; |