summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Flag.pm
diff options
context:
space:
mode:
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);