From 0551dc5d31c2472c737a40b3b1c9e87f73732cb3 Mon Sep 17 00:00:00 2001 From: Reed Loden Date: Wed, 7 Jul 2010 23:14:56 -0700 Subject: Bug 452761: Make the Date header of bugmail and requestmail always be equal to the delta_ts of the bug. This makes emails have the right Date even when they are sent much later by jobqueue.pl. r=mkanat, a=mkanat --- Bugzilla/Flag.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Flag.pm') diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index 308eb64d1..13dfe6ad9 100644 --- a/Bugzilla/Flag.pm +++ b/Bugzilla/Flag.pm @@ -964,18 +964,24 @@ sub notify { # If there are users in the CC list who don't have an account, # use the default language for email notifications. my $default_lang; + my $default_timezone; if (grep { !$_ } values %recipients) { $default_lang = Bugzilla::User->new()->settings->{'lang'}->{'value'}; + $default_timezone = Bugzilla::User->new()->settings->{'timezone'}->{'value'}; } foreach my $to (keys %recipients) { # Add threadingmarker to allow flag notification emails to be the # threaded similar to normal bug change emails. my $thread_user_id = $recipients{$to} ? $recipients{$to}->id : 0; - + + my $timezone = $recipients{$to} ? + $recipients{$to}->settings->{'timezone'}->{'value'} : $default_timezone; + my $vars = { 'flag' => $flag, 'old_flag' => $old_flag, 'to' => $to, + 'timezone' => $timezone, 'bug' => $bug, 'attachment' => $attachment, 'threadingmarker' => build_thread_marker($bug->id, $thread_user_id) }; -- cgit v1.2.3-24-g4f1b