diff options
author | lpsolit%gmail.com <> | 2005-10-27 01:52:18 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-10-27 01:52:18 +0200 |
commit | 7ef9d5bb8be67e5bfa611eb19e2fcd349289c38a (patch) | |
tree | 1bf08d3c4d468d883926c2be507a2adc3dc86d50 /Bugzilla | |
parent | 17425864550a0d5c968ea0aa5167f4728f4fa11d (diff) | |
download | bugzilla-7ef9d5bb8be67e5bfa611eb19e2fcd349289c38a.tar.gz bugzilla-7ef9d5bb8be67e5bfa611eb19e2fcd349289c38a.tar.xz |
Bug 150105: $debug flag in buglist.cgi not working - Patch by Teemu Mannermaa <wicked@etlicon.fi> r=LpSolit a=myk
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Search.pm | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index 5a651a3b5..ebccdb51e 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -102,6 +102,8 @@ sub init { my @orderby; my $debug = 0; + my @debugdata; + if ($params->param('debug')) { $debug = 1; } my @fields; my @supptables; @@ -1160,7 +1162,9 @@ sub init { $params->param("type$chart-$row-$col", shift(@$ref)); $params->param("value$chart-$row-$col", shift(@$ref)); if ($debug) { - print qq{<p>$params->param("field$chart-$row-$col") | $params->param("type$chart-$row-$col") | $params->param("value$chart-$row-$col")*</p>\n}; + push(@debugdata, "$row-$col = " . + $params->param("field$chart-$row-$col") . ' | ' . $params->param("type$chart-$row-$col") . ' | ' . + $params->param("value$chart-$row-$col") . ' *'); } $col++; @@ -1298,7 +1302,7 @@ sub init { if ("$f,$t,$rhs" =~ m/$key/) { my $ref = $funcsbykey{$key}; if ($debug) { - print "<p>$key ($f , $t , $rhs ) => "; + push(@debugdata, "$key ($f / $t / $rhs) =>"); } $ff = $f; if ($f !~ /\./) { @@ -1306,7 +1310,8 @@ sub init { } &$ref; if ($debug) { - print "$f , $t , $v , $term</p>"; + push(@debugdata, "$f / $t / $v / " . + ($term || "undef") . " *"); } if ($term) { last; @@ -1436,12 +1441,8 @@ sub init { $query .= " ORDER BY " . join(',', @orderby); } - if ($debug) { - print "<p><code>" . value_quote($query) . "</code></p>\n"; - exit; - } - $self->{'sql'} = $query; + $self->{'debugdata'} = \@debugdata; } ############################################################################### @@ -1601,6 +1602,11 @@ sub getSQL { return $self->{'sql'}; } +sub getDebugData { + my $self = shift; + return $self->{'debugdata'}; +} + sub pronoun { my ($noun, $user) = (@_); if ($noun eq "%user%") { |