From: reed%reedloden.com <> Date: Tue, 5 Jan 2010 07:05:59 +0000 (+0000) Subject: Bug 534587 - "Bugmail uses the timezone of the changee instead of the user receiving... X-Git-Tag: bugzilla-3.5.3~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f170f68df81a531091578baca25c789076a3c467;p=thirdparty%2Fbugzilla.git Bug 534587 - "Bugmail uses the timezone of the changee instead of the user receiving the mail" [p=reed r=mkanat a=mkanat] --- diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 2aff7daf4e..f7af921ebc 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -612,7 +612,7 @@ sub sendMail { my $vars = { isnew => $isnew, - to => $user->email, + to_user => $user, bugid => $id, alias => Bugzilla->params->{'usebugaliases'} ? $values{'alias'} : "", classification => $values{'classification'}, diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index ca2506ffa3..437979c853 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -413,8 +413,8 @@ sub wrap_hard { sub format_time { my ($date, $format, $timezone) = @_; - # If $format is undefined, try to guess the correct date format. - if (!defined($format)) { + # If $format is not set, try to guess the correct date format. + if (!$format) { if (!ref $date && $date =~ /^(\d{4})[-\.](\d{2})[-\.](\d{2}) (\d{2}):(\d{2})(:(\d{2}))?$/) { diff --git a/template/en/default/email/newchangedmail.txt.tmpl b/template/en/default/email/newchangedmail.txt.tmpl index 368c237134..1bcc2e40d1 100644 --- a/template/en/default/email/newchangedmail.txt.tmpl +++ b/template/en/default/email/newchangedmail.txt.tmpl @@ -20,7 +20,7 @@ [% PROCESS "global/variables.none.tmpl" %] From: [% Param('mailfrom') %] -To: [% to %] +To: [% to_user.email %] Subject: [[% terms.Bug %] [%+ bugid %]] [% 'New: ' IF isnew %][%+ summary %] X-Bugzilla-Reason: [% reasonsheader %] X-Bugzilla-Type: [% isnew ? 'new' : 'changed' %] @@ -48,7 +48,7 @@ X-Bugzilla-Changed-Fields: [% changedfields %] [% FOREACH comment = new_comments %] [%- IF comment.count %] ---- Comment #[% comment.count %] from [% comment.author.identity %] [%+ comment.time FILTER time %] --- +--- Comment #[% comment.count %] from [% comment.author.identity %] [%+ comment.time FILTER time(undef, to_user.timezone) %] --- [% END %] [%+ comment.body_full({ is_bugmail => 1, wrap => 1 }) %] [% END %]