summaryrefslogtreecommitdiffstats
path: root/whine.pl
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-04-03 00:42:25 +0200
committerlpsolit%gmail.com <>2008-04-03 00:42:25 +0200
commit43b7dc314234e476a80d9acbd07292d7286cca5a (patch)
tree87c77bfa7d65b7636447232feb77fe5db1d7d8d4 /whine.pl
parent0e4b8f785d87afacbf432f6985a3d906b35bba21 (diff)
downloadbugzilla-43b7dc314234e476a80d9acbd07292d7286cca5a.tar.gz
bugzilla-43b7dc314234e476a80d9acbd07292d7286cca5a.tar.xz
Bug 405946: Some emails are not sent in the language chosen by the addressee - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wurblzap a=LpSolit
Diffstat (limited to 'whine.pl')
-rwxr-xr-xwhine.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/whine.pl b/whine.pl
index 8f4671321..e49e4816a 100755
--- a/whine.pl
+++ b/whine.pl
@@ -353,10 +353,11 @@ while (my $event = get_next_event) {
#
sub mail {
my $args = shift;
+ my $addressee = $args->{recipient};
+ # Don't send mail to someone whose bugmail notification is disabled.
+ return if $addressee->email_disabled;
- # Don't send mail to someone on the nomail list.
- return if $args->{recipient}->email_disabled;
-
+ my $template = Bugzilla->template_inner($addressee->settings->{'lang'}->{'value'});
my $msg = ''; # it's a temporary variable to hold the template output
$args->{'alternatives'} ||= [];
@@ -387,6 +388,7 @@ sub mail {
$template->process("whine/multipart-mime.txt.tmpl", $args, \$msg)
or die($template->error());
+ Bugzilla->template_inner("");
MessageToMTA($msg);
delete $args->{'boundary'};