From 5a10ebe6514918f89e60e0dc43fa19ebe06c03be Mon Sep 17 00:00:00 2001 From: "wurblzap%gmail.com" <> Date: Tue, 2 Jun 2009 22:00:10 +0000 Subject: Bug 457657 – Make e-mail comment header localizable. Patch by Marc Schumann , r/a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/User.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Bugzilla/User.pm') diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 55be2cf9e..0eb47b8b3 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -1372,8 +1372,9 @@ our %names_to_events = ( # Note: the "+" signs before the constants suppress bareword quoting. sub wants_bug_mail { my $self = shift; - my ($bug_id, $relationship, $fieldDiffs, $commentField, $dependencyText, + my ($bug_id, $relationship, $fieldDiffs, $comments, $dependencyText, $changer, $bug_is_new) = @_; + my $comments_concatenated = join("\n", map { $_->{body} } (@$comments)); # Make a list of the events which have happened during this bug change, # from the point of view of this user. @@ -1422,10 +1423,10 @@ sub wants_bug_mail { } } - if ($commentField =~ /Created an attachment \(/) { + if ($comments_concatenated =~ /Created an attachment \(/) { $events{+EVT_ATTACHMENT} = 1; } - elsif ($commentField ne '') { + elsif (defined($$comments[0])) { $events{+EVT_COMMENT} = 1; } -- cgit v1.2.3-24-g4f1b