Bug 91009 - Move storing mail data into request_cache

git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@1718 6955db30-a419-402b-8a0d-67ecbb4d7f56
master
akrasilnikov 2013-07-12 12:07:21 +00:00
parent 46d16340d5
commit 90833366b1
3 changed files with 8 additions and 9 deletions

View File

@ -304,9 +304,9 @@ sub init_page {
##################################################################### #####################################################################
sub add_mail_result { sub add_mail_result {
my ($class, $type, $lang, $params) = @_; my ($class, $send_result_item) = @_;
my $cache = $class->request_cache; my $cache = $class->request_cache;
push(@{$cache->{send_mail_result}}, { 'type' => $type, 'lang' => $lang, 'params' => $params }); push(@{$cache->{send_mail_result}}, $send_result_item);
} }
sub get_mail_result { sub get_mail_result {

View File

@ -1044,7 +1044,7 @@ sub notify {
my $lang = $recipients{$to} ? my $lang = $recipients{$to} ?
$recipients{$to}->settings->{'lang'}->{'value'} : $default_lang; $recipients{$to}->settings->{'lang'}->{'value'} : $default_lang;
Bugzilla->add_mail_result('flag', $lang, $vars); Bugzilla->add_mail_result({type => 'flag', notify_data => $vars);
} }
} }

View File

@ -734,12 +734,11 @@ foreach my $msg (@msgs) {
#Add flag notify to send_result #Add flag notify to send_result
my $notify = Bugzilla->get_mail_result(); my $notify = Bugzilla->get_mail_result();
foreach my $notify_item (@$notify) {
push @$send_results, { use Data::Dumper;
type => $notify_item->{type}, die(Dumper($notify));
notify_data => $notify_item
}; push @$send_results, @$notify;
}
send_results($_) for @$send_results; send_results($_) for @$send_results;
$vars->{sentmail} = $send_results; $vars->{sentmail} = $send_results;