From 48be98eaf37963ea5cea20fe8d9f2a185e2405ff Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Thu, 5 Jun 2008 12:16:30 -0500 Subject: [PATCH] Fix date filter on issues_stats. Signed-off-by: Joshua Ferraro --- reports/issues_stats.pl | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl index 2d91748ffd..c75ccfdcd6 100755 --- a/reports/issues_stats.pl +++ b/reports/issues_stats.pl @@ -58,7 +58,6 @@ my $output = $input->param("output"); my $basename = $input->param("basename"); my $mime = $input->param("MIME"); my $del = $input->param("sep"); -#warn "calcul : ".$calc; my ($template, $borrowernumber, $cookie) = get_template_and_user({template_name => $fullreportname, query => $input, @@ -336,10 +335,9 @@ sub calculate { $strsth .=" group by $linefield"; $strsth .=" order by $lineorder"; $debug and warn $strsth; - my $sth = $dbh->prepare( $strsth ); if (( @linefilter ) and ($linefilter[1])){ - $sth->execute("'".$linefilter[0]."'","'".$linefilter[1]."'"); + $sth->execute($linefilter[0],$linefilter[1]); } elsif ($linefilter[0]) { $sth->execute($linefilter[0]); } else { @@ -470,18 +468,16 @@ sub calculate { $ft{totalcol} = 0; push @loopcol, \%cell; } -# warn "fin des titres colonnes"; my $i=0; my @totalcol; #Initialization of cell values..... my %table; -# warn "init table"; foreach my $row ( @loopline ) { foreach my $col ( @loopcol ) { $debug and warn " init table : $row->{rowtitle} ( $row->{rowtitle_display} ) / $col->{coltitle} ( $col->{coltitle_display} ) "; - $table{$row->{rowtitle}}->{$col->{coltitle}}=0; + $table{$row->{rowtitle}}->{$col->{coltitle}}=0; } $table{$row->{rowtitle}}->{totalrow}=0; } @@ -538,7 +534,6 @@ sub calculate { ($debug) and warn "". $strcalc; my $dbcalc = $dbh->prepare($strcalc); $dbcalc->execute; -# warn "filling table"; my ($emptycol,$emptyrow); while (my ($row, $col, $value) = $dbcalc->fetchrow) { ($debug) and warn "filling table $row / $col / $value "; @@ -571,14 +566,12 @@ sub calculate { 'totalrow' => $table{($row->{rowtitle} eq "NULL")?"zzEMPTY":$row->{rowtitle}}->{totalrow} }; } -# warn "footer processing"; for my $col ( @loopcol ) { my $total=0; foreach my $row ( @looprow ) { $total += $table{($row->{rowtitle} eq "NULL")?"zzEMPTY":$row->{rowtitle}}->{($col->{coltitle} eq "NULL")?"zzEMPTY":$col->{coltitle}}; $debug and warn "value added ".$table{$row->{rowtitle}}->{$col->{coltitle}}. "for line ".$row->{rowtitle}; } -# warn "summ for column ".$col->{coltitle}." = ".$total; push @loopfooter, {'totalcol' => $total}; } -- 2.39.5