diff options
author | mkanat%bugzilla.org <> | 2009-08-19 04:46:30 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-08-19 04:46:30 +0000 |
commit | c47cbd8461ee1d52de2813a676b6a4b858064703 (patch) | |
tree | ff4875e585a11bc4abec14569889f0fb09a26028 | |
parent | Bug 510944: Sorting bug lists on some fields can fail - Patch by Frédér... (diff) | |
download | bugzilla-c47cbd8461ee1d52de2813a676b6a4b858064703.tar.gz bugzilla-c47cbd8461ee1d52de2813a676b6a4b858064703.tar.bz2 bugzilla-c47cbd8461ee1d52de2813a676b6a4b858064703.zip |
Bug 73330: Remove extra newlines in bugmail
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
-rw-r--r-- | Bugzilla/BugMail.pm | 4 | ||||
-rw-r--r-- | template/en/default/email/newchangedmail.txt.tmpl | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 9a1b2a8a2..ec4bf30da 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -352,7 +352,7 @@ sub Send { if ($deptext) { my $diffpart = {}; - $diffpart->{'text'} = "\n" . trim("\n\n" . $deptext); + $diffpart->{'text'} = "\n" . trim($deptext); push(@diffparts, $diffpart); } } @@ -595,6 +595,8 @@ sub sendMail { } my $diffs = $difftext; + # Remove extra newlines. + $diffs =~ s/^\n+//s; $diffs =~ s/\n+$//s; if ($isnew) { my $head = ""; foreach my $f (@headerlist) { diff --git a/template/en/default/email/newchangedmail.txt.tmpl b/template/en/default/email/newchangedmail.txt.tmpl index 494c12060..b90c15b1d 100644 --- a/template/en/default/email/newchangedmail.txt.tmpl +++ b/template/en/default/email/newchangedmail.txt.tmpl @@ -41,8 +41,10 @@ X-Bugzilla-Changed-Fields: [% changedfields %] [%+ threadingmarker %] [%+ urlbase %]show_bug.cgi?id=[% bugid %] +[%- IF diffs %] [%+ diffs %] +[% END -%] [% FOREACH comment = new_comments %] --- Comment #[% comment.count %] from [% comment.author.identity %] [%+ comment.time FILTER time %] --- |