diff options
Diffstat (limited to 'page.cgi')
-rwxr-xr-x | page.cgi | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -31,6 +31,9 @@ use strict; use lib "."; + +use Bugzilla; + require "CGI.pl"; use vars qw($template $vars); @@ -39,6 +42,8 @@ ConnectToDatabase(); quietly_check_login(); +my $cgi = Bugzilla->cgi; + if ($::FORM{'id'}) { # Remove all dodgy chars, and split into name and ctype. $::FORM{'id'} =~ s/[^\w\-\.]//g; @@ -47,8 +52,8 @@ if ($::FORM{'id'}) { my $format = GetFormat($1, undef, $2); $vars->{'form'} = \%::FORM; - - print "Content-Type: $format->{'ctype'}\n\n"; + + print $cgi->header($format->{'ctype'}); $template->process("pages/$format->{'template'}", $vars) || ThrowTemplateError($template->error()); |