From 8f893f4d3aa0c635193b2f4240fc707bd31846ac Mon Sep 17 00:00:00 2001 From: "wurblzap%gmail.com" <> Date: Fri, 31 Mar 2006 06:22:08 +0000 Subject: Bug 306695: Boolean charts forgets "0" values. Patch by Marc Schumann , r=LpSolit, bugreport, a=justdave --- Bugzilla/CGI.pm | 2 +- query.cgi | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index b722aee3d..bc2d39b99 100644 --- a/Bugzilla/CGI.pm +++ b/Bugzilla/CGI.pm @@ -116,7 +116,7 @@ sub canonicalise_query { my $esc_key = url_quote($key); foreach my $value ($self->param($key)) { - if ($value) { + if (defined($value)) { my $esc_value = url_quote($value); push(@parameters, "$esc_key=$esc_value"); diff --git a/query.cgi b/query.cgi index bda05d7aa..7286a4b2e 100755 --- a/query.cgi +++ b/query.cgi @@ -314,9 +314,13 @@ for (my $chart = 0; $cgi->param("field$chart-0-0"); $chart++) { for (my $row = 0; $cgi->param("field$chart-$row-0"); $row++) { my @cols; for (my $col = 0; $cgi->param("field$chart-$row-$col"); $col++) { + my $value = $cgi->param("value$chart-$row-$col"); + if (!defined($value)) { + $value = ''; + } push(@cols, { field => $cgi->param("field$chart-$row-$col"), type => $cgi->param("type$chart-$row-$col") || 'noop', - value => $cgi->param("value$chart-$row-$col") || '' }); + value => $value }); } push(@rows, \@cols); } -- cgit v1.2.3-24-g4f1b