aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjocuri%softhome.net <>2004-03-27 05:00:11 +0000
committerjocuri%softhome.net <>2004-03-27 05:00:11 +0000
commitc0fc50d35b1e3320b28b281c16489f78babc5abb (patch)
tree588957a4a2130089f67533b55ab3a7b7c6c53106 /duplicates.cgi
parentBug 232097: Use an entity reference for the landfill base URL in the demos, t... (diff)
downloadbugzilla-c0fc50d35b1e3320b28b281c16489f78babc5abb.tar.gz
bugzilla-c0fc50d35b1e3320b28b281c16489f78babc5abb.tar.bz2
bugzilla-c0fc50d35b1e3320b28b281c16489f78babc5abb.zip
Patch for bug 237369: implement relatively simple changes from %FORM to $cgi->param variable; patch by Teemu Mannermaa <wicked@etlicon.fi>; r=kiko, justdave; a=justdave.
Diffstat (limited to 'duplicates.cgi')
-rwxr-xr-xduplicates.cgi18
1 files changed, 8 insertions, 10 deletions
diff --git a/duplicates.cgi b/duplicates.cgi
index 5da90e7b9..aa627fc40 100755
--- a/duplicates.cgi
+++ b/duplicates.cgi
@@ -32,8 +32,6 @@ use lib qw(.);
require "globals.pl";
require "CGI.pl";
-use vars qw($buffer);
-
use Bugzilla;
use Bugzilla::Search;
use Bugzilla::Config qw(:DEFAULT $datadir);
@@ -44,8 +42,8 @@ my $cgi = Bugzilla->cgi;
# Go directly to the XUL version of the duplicates report (duplicates.xul)
# if the user specified ctype=xul. Adds params if they exist, and directs
# the user to a signed copy of the script in duplicates.jar if it exists.
-if ($::FORM{'ctype'} && $::FORM{'ctype'} eq "xul") {
- my $params = CanonicaliseParams($::buffer, ["format", "ctype"]);
+if (defined $cgi->param('ctype') && $cgi->param('ctype') eq "xul") {
+ my $params = CanonicaliseParams($cgi->query_string(), ["format", "ctype"]);
my $url = (-e "duplicates.jar" ? "duplicates.jar!/" : "") .
"duplicates.xul" . ($params ? "?$params" : "") . "\n\n";
@@ -71,7 +69,7 @@ else {
Bugzilla->switch_to_shadow_db();
-use vars qw (%FORM $userid @legal_product);
+use vars qw ($userid @legal_product);
my %dbmcount;
my %count;
@@ -80,7 +78,7 @@ my %before;
# Get params from URL
sub formvalue {
my ($name, $default) = (@_);
- return $FORM{$name} || $default || "";
+ return $cgi->param($name) || $default || "";
}
my $sortby = formvalue("sortby");
@@ -218,7 +216,7 @@ if (scalar(%count)) {
}
# Restrict to product if requested
- if ($::FORM{'product'}) {
+ if ($cgi->param('product')) {
$params->param('product', join(',', @query_products));
}
@@ -267,13 +265,13 @@ $vars->{'changedsince'} = $changedsince;
$vars->{'maxrows'} = $maxrows;
$vars->{'openonly'} = $openonly;
$vars->{'reverse'} = $reverse;
-$vars->{'format'} = $::FORM{'format'};
+$vars->{'format'} = $cgi->param('format');
$vars->{'query_products'} = \@query_products;
$vars->{'products'} = \@::legal_product;
-my $format =
- GetFormat("reports/duplicates", $::FORM{'format'}, $::FORM{'ctype'});
+my $format = GetFormat("reports/duplicates", scalar($cgi->param('format')),
+ scalar($cgi->param('ctype')));
print $cgi->header($format->{'ctype'});