summaryrefslogtreecommitdiffstats
path: root/show_bug.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'show_bug.cgi')
-rwxr-xr-xshow_bug.cgi11
1 files changed, 8 insertions, 3 deletions
diff --git a/show_bug.cgi b/show_bug.cgi
index c4c05f42c..711b7201b 100755
--- a/show_bug.cgi
+++ b/show_bug.cgi
@@ -24,14 +24,18 @@ use strict;
use lib qw(.);
+use Bugzilla;
+
require "CGI.pl";
ConnectToDatabase();
-use vars qw($cgi $template $vars $userid);
+use vars qw($template $vars $userid);
use Bug;
+my $cgi = Bugzilla->cgi;
+
if ($::FORM{'GoAheadAndLogIn'}) {
confirm_login();
} else {
@@ -44,7 +48,7 @@ my $single = !$cgi->param('format')
# If we don't have an ID, _AND_ we're only doing a single bug, then prompt
if (!defined $cgi->param('id') && $single) {
- print "Content-type: text/html\n\n";
+ print Bugzilla->cgi->header();
$template->process("bug/choose.html.tmpl", $vars) ||
ThrowTemplateError($template->error());
exit;
@@ -100,6 +104,7 @@ foreach ($cgi->param("excludefield")) {
$vars->{'displayfields'} = \%displayfields;
-print "Content-type: $format->{'ctype'}\n\n";
+print $cgi->header($format->{'ctype'});
+
$template->process("$format->{'template'}", $vars)
|| ThrowTemplateError($template->error());