diff options
author | matthew <matthew> | 2007-05-14 21:32:32 +0000 |
---|---|---|
committer | matthew <matthew> | 2007-05-14 21:32:32 +0000 |
commit | 8a19fabc7387a9ff2ad8e43e0ce796af69c240a2 (patch) | |
tree | 9dd23e3ca4fbdf43984724ef8e55c80d6651dd46 | |
parent | 3716d7fc96e829322009abcfb5ea34f7cf326374 (diff) |
Bugfix.
-rw-r--r-- | perllib/Page.pm | 8 | ||||
-rwxr-xr-x | web/index.cgi | 6 | ||||
-rwxr-xr-x | web/report.cgi | 5 |
3 files changed, 9 insertions, 10 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm index 2e92e99f0..e779bb57b 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: Page.pm,v 1.46 2007-05-14 21:21:44 matthew Exp $ +# $Id: Page.pm,v 1.47 2007-05-14 21:32:32 matthew Exp $ # package Page; @@ -86,10 +86,8 @@ EOF <style type="text/css">\@import url("/css.css");</style> EOF if ($params{rss}) { - foreach (keys %{$params{rss}}) { - print '<link rel="alternate" type="application/rss+xml" title="' - . $_ . '" href="' . $params{rss}{$_} . '">'; - } + $html .= '<link rel="alternate" type="application/rss+xml" title="' + . $params{rss}[0] . '" href="' . $params{rss}[1] . '">'; } $html .= <<EOF; </head> diff --git a/web/index.cgi b/web/index.cgi index fde9b671c..e60069691 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.130 2007-05-14 21:21:44 matthew Exp $ +# $Id: index.cgi,v 1.131 2007-05-14 21:32:32 matthew Exp $ use strict; require 5.8.0; @@ -534,7 +534,7 @@ EOF $out .= Page::display_map_end(1); my %params = ( - 'Recent local problems, Neighbourhood Fix-It' => "/rss/$x,$y" + rss => [ 'Recent local problems, Neighbourhood Fix-It', "/rss/$x,$y" ] ); return ($out, %params); @@ -640,7 +640,7 @@ EOF $out .= Page::display_map_end(0); my %params = ( - 'Updates to this problem, Neighbourhood Fix-It' => "/rss/$input_h{id}" + rss => [ 'Updates to this problem, Neighbourhood Fix-It', "/rss/$input_h{id}" ] ); return ($out, %params); } diff --git a/web/report.cgi b/web/report.cgi index 0a4a1025a..8189573a5 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.27 2007-05-14 21:21:44 matthew Exp $ +# $Id: report.cgi,v 1.28 2007-05-14 21:32:32 matthew Exp $ use strict; require 5.8.0; @@ -37,6 +37,7 @@ sub main { my $q = shift; my $all = $q->param('all') || 0; my $one_council = $q->param('council'); + $one_council =~ s/\D//g; $all = 0 unless $one_council; my @params; my $where_extra = ''; @@ -92,7 +93,7 @@ sub main { } print '</table>'; } else { - print Page::header($q, 'Summary reports', rss => ('Problems in this council, Neighbourhood Fix-It' => "/rss/council/$one_council")); + print Page::header($q, 'Summary reports', rss => [ 'Problems in this council, Neighbourhood Fix-It', "/rss/council/$one_council" ]); print $q->p( $q->a({href => "/rss/council/$one_council"}, '<img align="right" src="/i/feed.png" width="16" height="16" title="RSS feed" alt="RSS feed of problems in this council" border="0" hspace="4">'), 'This is a summary of all reports for one council. You can ' . |