summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-04-05 08:31:13 +0200
committerlpsolit%gmail.com <>2006-04-05 08:31:13 +0200
commitc8458af4ba895a5614c44fe9f85795f2142efb5a (patch)
tree5c632cdcfbe2756a99e9933b203d0c64fe53ccc5 /Bugzilla
parentb0b4c4fce29ca6ea88675165f2e7f6100609e9e7 (diff)
downloadbugzilla-c8458af4ba895a5614c44fe9f85795f2142efb5a.tar.gz
bugzilla-c8458af4ba895a5614c44fe9f85795f2142efb5a.tar.xz
Bug 275637: Templatise 'voteremovedmail' email - Patch by Emmanuel Seyman <eseyman@linagora.com> r=LpSolit a=justdave
Diffstat (limited to 'Bugzilla')
-rwxr-xr-xBugzilla/Bug.pm27
-rw-r--r--Bugzilla/Config/MTA.pm19
2 files changed, 15 insertions, 31 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 60779b29f..42bfe8664 100755
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -1048,23 +1048,26 @@ sub RemoveVotes {
# Now lets send the e-mail to alert the user to the fact that their votes have
# been reduced or removed.
- my %substs;
+ my $vars = {
- $substs{"to"} = $name . Param('emailsuffix');
- $substs{"bugid"} = $id;
- $substs{"reason"} = $reason;
+ 'to' => $name . Param('emailsuffix'),
+ 'bugid' => $id,
+ 'reason' => $reason,
- $substs{"votesremoved"} = $removedvotes;
- $substs{"votesold"} = $oldvotes;
- $substs{"votesnew"} = $newvotes;
+ 'votesremoved' => $removedvotes,
+ 'votesold' => $oldvotes,
+ 'votesnew' => $newvotes,
- $substs{"votesremovedtext"} = $removedvotestext;
- $substs{"votesoldtext"} = $oldvotestext;
- $substs{"votesnewtext"} = $newvotestext;
+ 'votesremovedtext' => $removedvotestext,
+ 'votesoldtext' => $oldvotestext,
+ 'votesnewtext' => $newvotestext,
- $substs{"count"} = $removedvotes . "\n " . $newvotestext;
+ 'count' => $removedvotes . "\n " . $newvotestext
+ };
- my $msg = perform_substs(Param("voteremovedmail"), \%substs);
+ my $msg;
+ my $template = Bugzilla->template;
+ $template->process("email/votes-removed.txt.tmpl", $vars, \$msg);
push(@messages, $msg);
}
my $votes = $dbh->selectrow_array("SELECT SUM(vote_count) " .
diff --git a/Bugzilla/Config/MTA.pm b/Bugzilla/Config/MTA.pm
index 47370d34e..7a6cc2ee0 100644
--- a/Bugzilla/Config/MTA.pm
+++ b/Bugzilla/Config/MTA.pm
@@ -140,25 +140,6 @@ haven\'t been touched for a week or more.
You will get this message once a day until you\'ve dealt with these bugs!
'
- },
-
- {
- name => 'voteremovedmail',
- type => 'l',
- default => 'From: bugzilla-daemon
-To: %to%
-Subject: [Bug %bugid%] Some or all of your votes have been removed.
-
-Some or all of your votes have been removed from bug %bugid%.
-
-%votesoldtext%
-
-%votesnewtext%
-
-Reason: %reason%
-
-%urlbase%show_bug.cgi?id=%bugid%
-'
} );
return @param_list;
}