aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rwxr-xr-xweb/report.cgi15
1 files changed, 8 insertions, 7 deletions
diff --git a/web/report.cgi b/web/report.cgi
index 571e1c6ca..d6f45b371 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.13 2007-05-09 16:36:04 matthew Exp $
+# $Id: report.cgi,v 1.14 2007-05-09 18:50:09 matthew Exp $
use strict;
require 5.8.0;
@@ -61,8 +61,11 @@ sub main {
my $age = ($row->{age} > 4*7*24*60*60) ? 'old' : 'new';
my $duration = ($row->{duration} > 4*7*24*60*60) ? 'old' : 'new';
foreach (@council) {
- push @{$out{$_}{$row->{state}}{$age}{$duration}},
- [ $row->{id}, $row->{title}, $row->{detail}, scalar @council ];
+ my $row = [ $row->{id}, $row->{title}, $row->{detail}, scalar @council ];
+ push @{$out{$_}{fixed}{$duration}}, $row
+ if $row->{state} eq 'fixed';
+ push @{$out{$_}{confirmed}{$age}{$duration}}, $row
+ if $row->{state} eq 'confirmed';
}
}
my $areas_info = mySociety::MaPit::get_voting_areas_info([keys %out]);
@@ -84,12 +87,10 @@ sub main {
print "</h2>\n";
list_problems('New problems', $out{$_}{confirmed}{new}{new}, $all) if $out{$_}{confirmed}{new}{new};
# list_problems('Old problems', $out{$_}{confirmed}{new}{old}, $all) if $out{$_}{confirmed};
- list_problems('New problems, already fixed', $out{$_}{fixed}{new}{new}, $all) if $out{$_}{fixed}{new}{new};
- # list_problems('Old fixed', $out{$_}{fixed}{new}{old}, $all) if $out{$_}{fixed};
list_problems('Old, still present problems', $out{$_}{confirmed}{old}{new}, $all) if $out{$_}{confirmed}{old}{new};
list_problems('Old unknown problems', $out{$_}{confirmed}{old}{old}, $all) if $out{$_}{confirmed}{old}{old};
- list_problems('Old problem on site, recently fixed', $out{$_}{fixed}{old}{new}, $all) if $out{$_}{fixed}{old}{new};
- list_problems('Old fixed', $out{$_}{fixed}{old}{old}, $all) if $out{$_}{fixed}{old}{old};
+ list_problems('Recently fixed', $out{$_}{fixed}{new}, $all) if $out{$_}{fixed}{new};
+ list_problems('Old fixed', $out{$_}{fixed}{old}, $all) if $out{$_}{fixed}{old};
}
print Page::footer();
dbh()->rollback();