summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Flag.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-10-25 08:11:55 +0200
committerlpsolit%gmail.com <>2005-10-25 08:11:55 +0200
commit44de29d04d1ca7e3b047b2a847508dc949c29038 (patch)
tree934c0ccce39c238b3bf6a0337014e6f1fde9918b /Bugzilla/Flag.pm
parent46aba0e761e99db24b5de10f13bbc108fdc982a4 (diff)
downloadbugzilla-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/Flag.pm')
-rw-r--r--Bugzilla/Flag.pm13
1 files changed, 6 insertions, 7 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm
index 54a8bea80..6f0cb94cc 100644
--- a/Bugzilla/Flag.pm
+++ b/Bugzilla/Flag.pm
@@ -74,10 +74,6 @@ use Bugzilla::BugMail;
use Bugzilla::Constants;
use Bugzilla::Field;
-# Note that this line doesn't actually import these variables for some reason,
-# so I have to use them as $::template and $::vars in the package code.
-use vars qw($template $vars);
-
######################################################################
# Global Variables
######################################################################
@@ -947,6 +943,9 @@ Sends an email notification about a flag being created or fulfilled.
sub notify {
my ($flag, $template_file) = @_;
+ my $template = Bugzilla->template;
+ my $vars = {};
+
my $attachment_is_private = $flag->{'target'}->{'attachment'} ?
$flag->{'target'}->{'attachment'}->{'isprivate'} : undef;
@@ -971,14 +970,14 @@ sub notify {
$flag->{'requestee'}->{'email'} .= Param('emailsuffix');
$flag->{'setter'}->{'email'} .= Param('emailsuffix');
- $::vars->{'flag'} = $flag;
+ $vars->{'flag'} = $flag;
my $message;
my $rv =
- $::template->process($template_file, $::vars, \$message);
+ $template->process($template_file, $vars, \$message);
if (!$rv) {
Bugzilla->cgi->header();
- ThrowTemplateError($::template->error());
+ ThrowTemplateError($template->error());
}
Bugzilla::BugMail::MessageToMTA($message);