diff options
author | lpsolit%gmail.com <> | 2005-10-25 08:11:55 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-10-25 08:11:55 +0200 |
commit | 44de29d04d1ca7e3b047b2a847508dc949c29038 (patch) | |
tree | 934c0ccce39c238b3bf6a0337014e6f1fde9918b /Bugzilla/Token.pm | |
parent | 46aba0e761e99db24b5de10f13bbc108fdc982a4 (diff) | |
download | bugzilla-44de29d04d1ca7e3b047b2a847508dc949c29038.tar.gz bugzilla-44de29d04d1ca7e3b047b2a847508dc949c29038.tar.xz |
Bug 312157: Remove $::template and $::vars from globals.pl - Patch by Olav Vitters <bugzilla-mozilla@bkor.dhs.org> r=LpSolit a=justdave
Diffstat (limited to 'Bugzilla/Token.pm')
-rw-r--r-- | Bugzilla/Token.pm | 14 |
1 files changed, 7 insertions, 7 deletions
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; |