From 818ce46d9780c7a04ac04a3f116021f1edadd476 Mon Sep 17 00:00:00 2001 From: "bbaetz%student.usyd.edu.au" <> Date: Sat, 26 Oct 2002 08:56:55 +0000 Subject: Bug 147833 - start using CGI.pm r=gerv, justdave --- report.cgi | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'report.cgi') diff --git a/report.cgi b/report.cgi index 9e60c1dc9..f4cb74dad 100755 --- a/report.cgi +++ b/report.cgi @@ -26,7 +26,7 @@ use lib "."; require "CGI.pl"; -use vars qw($template $vars); +use vars qw($cgi $template $vars); use Bugzilla::Search; @@ -77,11 +77,13 @@ my @axis_fields = ($row_field, $col_field, $tbl_field); my @selectnames = map($columns{$_}, @axis_fields); +# Clone the params, so that Bugzilla::Search can modify them +my $params = new Bugzilla::CGI($cgi); my $search = new Bugzilla::Search('fields' => \@selectnames, - 'url' => $::buffer); + 'params' => $params); my $query = $search->getSQL(); -SendSQL($query, $::userid); +SendSQL($query); # We have a hash of hashes for the data itself, and a hash to hold the # row/col/table names. @@ -108,12 +110,14 @@ $vars->{'names'} = \%names; $vars->{'data'} = \%data; $vars->{'time'} = time(); -$::buffer =~ s/format=[^&]*&?//g; +$cgi->delete('format'); # Calculate the base query URL for the hyperlinked numbers -$vars->{'buglistbase'} = CanonicaliseParams($::buffer, - ["x_axis_field", "y_axis_field", "z_axis_field", @axis_fields]); -$vars->{'buffer'} = $::buffer; +$vars->{'querybase'} = $cgi->canonicalise_query("x_axis_field", + "y_axis_field", + "z_axis_field", + @axis_fields); +$vars->{'query'} = $cgi->query_string(); # Generate and return the result from the appropriate template. my $format = GetFormat("reports/report", $::FORM{'format'}, $::FORM{'ctype'}); -- cgit v1.2.3-24-g4f1b