From e043bc7c21f6d206a78bcd6ba9fc5ba8bb2d7d2d Mon Sep 17 00:00:00 2001 From: "wurblzap%gmail.com" <> Date: Wed, 5 Sep 2007 03:01:53 +0000 Subject: Bug 394933 – “neworchanged” of bugmail could be localizable more easily. Patch by Marc Schumann ; r=mkanat; a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/BugMail.pm | 13 ++++++------- template/en/default/email/newchangedmail.txt.tmpl | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 539a481ed..d29ffaf1e 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -500,7 +500,7 @@ sub Send { \@diffparts, $comments{$lang}, $anyprivate, - $start, + ! $start, $id, exists $watching{$user_id} ? $watching{$user_id} : undef); @@ -522,8 +522,8 @@ sub Send { } sub sendMail { - my ($user, $hlRef, $relRef, $valueRef, $dmhRef, $fdRef, - $diffRef, $newcomments, $anyprivate, $start, + my ($user, $hlRef, $relRef, $valueRef, $dmhRef, $fdRef, + $diffRef, $newcomments, $anyprivate, $isnew, $id, $watchingRef) = @_; my %values = %$valueRef; @@ -590,8 +590,6 @@ sub sendMail { return 0; } - my $isnew = !$start; - # If an attachment was created, then add an URL. (Note: the 'g'lobal # replace should work with comments with multiple attachments.) @@ -629,13 +627,14 @@ sub sendMail { my $threadingmarker; if ($isnew) { $threadingmarker = "Message-ID: id . "$sitespec>"; - } else { + } + else { $threadingmarker = "In-Reply-To: id . "$sitespec>"; } my $vars = { - neworchanged => $isnew ? 'New: ' : '', + isnew => $isnew, to => $user->email, bugid => $id, alias => Bugzilla->params->{'usebugaliases'} ? $values{'alias'} : "", diff --git a/template/en/default/email/newchangedmail.txt.tmpl b/template/en/default/email/newchangedmail.txt.tmpl index 93d002d2a..7c0e30a27 100644 --- a/template/en/default/email/newchangedmail.txt.tmpl +++ b/template/en/default/email/newchangedmail.txt.tmpl @@ -21,7 +21,7 @@ [% PROCESS "global/variables.none.tmpl" %] From: [% Param('mailfrom') %] To: [% to %] -Subject: [[% terms.Bug %] [%+ bugid %]] [% neworchanged %][%+ summary %] +Subject: [[% terms.Bug %] [%+ bugid %]] [% 'New: ' IF isnew %][%+ summary %] X-Bugzilla-Reason: [% reasonsheader %] X-Bugzilla-Type: newchanged X-Bugzilla-Watch-Reason: [% reasonswatchheader %] -- cgit v1.2.3-24-g4f1b