aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi14
1 files changed, 9 insertions, 5 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 37a43afb4..76d86fe58 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -26,6 +26,7 @@
use strict;
use lib qw(.);
+use Bugzilla;
use Bugzilla::Constants;
require "CGI.pl";
@@ -55,6 +56,8 @@ use vars qw($vars $template);
ConnectToDatabase();
my $whoid = confirm_login();
+my $cgi = Bugzilla->cgi;
+
# do a match on the fields if applicable
&Bugzilla::User::match_field ({
@@ -85,16 +88,17 @@ if (!$product_id) {
# Set cookies
my $cookiepath = Param("cookiepath");
if (exists $::FORM{'product'}) {
- if (exists $::FORM{'version'}) {
- print "Set-Cookie: VERSION-$product=$::FORM{'version'} ; " .
- "path=$cookiepath ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
+ if (exists $::FORM{'version'}) {
+ $cgi->send_cookie(-name => "VERSION-$product",
+ -value => $cgi->param('version'),
+ -expires => "Fri, 01-Jan-2038 00:00:00 GMT");
}
}
if (defined $::FORM{'maketemplate'}) {
$vars->{'url'} = $::buffer;
- print "Content-type: text/html\n\n";
+ print $cgi->header();
$template->process("bug/create/make-template.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
@@ -491,7 +495,7 @@ if ($::COOKIE{"BUGLIST"}) {
}
$vars->{'bug_list'} = \@bug_list;
-print "Content-type: text/html\n\n";
+print $cgi->header();
$template->process("bug/create/created.html.tmpl", $vars)
|| ThrowTemplateError($template->error());