diff options
author | 2003-05-05 08:15:19 +0000 | |
---|---|---|
committer | 2003-05-05 08:15:19 +0000 | |
commit | 9488a8906592564ec2e7601041f3ea5484cde3cc (patch) | |
tree | b9308d1a3dcf639d1e561ede1186ff58afc01834 /duplicates.cgi | |
parent | Bug 204104 - internal error in Search.pm when searching for invalid (diff) | |
download | bugzilla-9488a8906592564ec2e7601041f3ea5484cde3cc.tar.gz bugzilla-9488a8906592564ec2e7601041f3ea5484cde3cc.tar.bz2 bugzilla-9488a8906592564ec2e7601041f3ea5484cde3cc.zip |
Bug 201816 - use CGI.pm for header output
r=joel, a=justdave
Diffstat (limited to 'duplicates.cgi')
-rwxr-xr-x | duplicates.cgi | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/duplicates.cgi b/duplicates.cgi index dc65ef502..27333cbab 100755 --- a/duplicates.cgi +++ b/duplicates.cgi @@ -36,15 +36,18 @@ use vars qw($buffer); use Bugzilla; use Bugzilla::Search; -use Bugzilla::CGI; + +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"]); - print "Location: " . (-e "duplicates.jar" ? "duplicates.jar!/" : "") . + my $url = (-e "duplicates.jar" ? "duplicates.jar!/" : "") . "duplicates.xul" . ($params ? "?$params" : "") . "\n\n"; + + print $cgi->redirect($url); exit; } @@ -261,8 +264,8 @@ $vars->{'products'} = \@::legal_product; my $format = GetFormat("reports/duplicates", $::FORM{'format'}, $::FORM{'ctype'}); - -print "Content-Type: $format->{'ctype'}\n\n"; + +print $cgi->header($format->{'ctype'}); # Generate and return the UI (HTML page) from the appropriate template. $template->process($format->{'template'}, $vars) |