From 9488a8906592564ec2e7601041f3ea5484cde3cc Mon Sep 17 00:00:00 2001 From: "bbaetz%acm.org" <> Date: Mon, 5 May 2003 08:15:19 +0000 Subject: Bug 201816 - use CGI.pm for header output r=joel, a=justdave --- token.cgi | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'token.cgi') diff --git a/token.cgi b/token.cgi index afe6d0361..7f7299a57 100755 --- a/token.cgi +++ b/token.cgi @@ -31,6 +31,8 @@ use lib qw(.); use vars qw($template $vars); +use Bugzilla; + # Include the Bugzilla CGI and general utility library. require "CGI.pl"; @@ -156,7 +158,7 @@ sub requestChangePassword { $vars->{'message'} = "password_change_request"; - print "Content-Type: text/html\n\n"; + print Bugzilla->cgi->header(); $template->process("global/message.html.tmpl", $vars) || ThrowTemplateError($template->error()); } @@ -164,7 +166,7 @@ sub requestChangePassword { sub confirmChangePassword { $vars->{'token'} = $::token; - print "Content-Type: text/html\n\n"; + print Bugzilla->cgi->header(); $template->process("account/password/set-forgotten-password.html.tmpl", $vars) || ThrowTemplateError($template->error()); } @@ -173,7 +175,7 @@ sub cancelChangePassword { $vars->{'message'} = "password_change_canceled"; Token::Cancel($::token, $vars->{'message'}); - print "Content-Type: text/html\n\n"; + print Bugzilla->cgi->header(); $template->process("global/message.html.tmpl", $vars) || ThrowTemplateError($template->error()); } @@ -200,14 +202,14 @@ sub changePassword { $vars->{'message'} = "password_changed"; - print "Content-Type: text/html\n\n"; + print Bugzilla->cgi->header(); $template->process("global/message.html.tmpl", $vars) || ThrowTemplateError($template->error()); } sub confirmChangeEmail { # Return HTTP response headers. - print "Content-Type: text/html\n\n"; + print Bugzilla->cgi->header(); $vars->{'token'} = $::token; @@ -249,7 +251,7 @@ sub changeEmail { DeriveGroup($userid); # Return HTTP response headers. - print "Content-Type: text/html\n\n"; + print Bugzilla->cgi->header(); # Let the user know their email address has been changed. @@ -300,7 +302,7 @@ sub cancelChangeEmail { SendSQL("UNLOCK TABLES"); # Return HTTP response headers. - print "Content-Type: text/html\n\n"; + print Bugzilla->cgi->header(); $template->process("global/message.html.tmpl", $vars) || ThrowTemplateError($template->error()); -- cgit v1.2.3-24-g4f1b