From 44de29d04d1ca7e3b047b2a847508dc949c29038 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 25 Oct 2005 06:11:55 +0000 Subject: Bug 312157: Remove $::template and $::vars from globals.pl - Patch by Olav Vitters r=LpSolit a=justdave --- Bugzilla/Token.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Bugzilla/Token.pm') diff --git a/Bugzilla/Token.pm b/Bugzilla/Token.pm index 1cf51a332..6a263cbee 100644 --- a/Bugzilla/Token.pm +++ b/Bugzilla/Token.pm @@ -60,8 +60,8 @@ sub IssueEmailChangeToken { # Mail the user the token along with instructions for using it. - my $template = $::template; - my $vars = $::vars; + my $template = Bugzilla->template; + my $vars = {}; $vars->{'oldemailaddress'} = $old_email . Param('emailsuffix'); $vars->{'newemailaddress'} = $new_email . Param('emailsuffix'); @@ -115,8 +115,8 @@ sub IssuePasswordToken { # Mail the user the token along with instructions for using it. - my $template = $::template; - my $vars = $::vars; + my $template = Bugzilla->template; + my $vars = {}; $vars->{'token'} = $token; $vars->{'emailaddress'} = $loginname . Param('emailsuffix'); @@ -180,9 +180,10 @@ sub Cancel { # This should only happen when the user accidentally makes a token request # or when a malicious hacker makes a token request on behalf of a user. - my ($token, $cancelaction) = @_; + my ($token, $cancelaction, $vars) = @_; my $dbh = Bugzilla->dbh; + $vars ||= {}; # Quote the token for inclusion in SQL statements. my $quotedtoken = &::SqlQuote($token); @@ -198,8 +199,7 @@ sub Cancel { # Get the email address of the Bugzilla maintainer. my $maintainer = Param('maintainer'); - my $template = $::template; - my $vars = $::vars; + my $template = Bugzilla->template; $vars->{'emailaddress'} = $loginname . Param('emailsuffix'); $vars->{'maintainer'} = $maintainer; -- cgit v1.2.3-24-g4f1b