Commit f517e826 authored by olivier.salaun's avatar olivier.salaun
Browse files

Fix: Renamed 'msg' parameter to 'msg_path' in moderate.tt2.

Take 'spool' parameter into account (for 'modindex' template) in the reformat_message() process


git-svn-id: https://subversion.renater.fr/sympa/trunk@4123 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent bfd2e9fa
......@@ -36,6 +36,6 @@ Content-Transfer-Encoding: [%|loc%]_encoding_[%END%]
Content-Disposition: inline
X-Sympa-Attach: yes
[% INSERT $msg IF msg %]
[% INSERT $msg_path IF msg_path %]
--[% boundary %]--
......@@ -2650,7 +2650,7 @@ sub send_msg {
} else {
@selected_tabrcpt = @tabrcpt;
}
my @verp_selected_tabrcpt = &extract_verp_rcpt($verp_rate, $xsequence,\@selected_tabrcpt, \@tabrcpt_verp);
......@@ -3677,7 +3677,7 @@ sub send_to_editor {
close CRYPTED;
$param->{'msg'} = $crypted_file;
$param->{'msg_path'} = $crypted_file;
&tt2::allow_absolute_path();
unless ($self->send_file('moderate', $recipient, $self->{'domain'}, $param)) {
......@@ -3686,7 +3686,7 @@ sub send_to_editor {
}
}
}else{
$param->{'msg'} = $file;
$param->{'msg_path'} = $file;
&tt2::allow_absolute_path();
unless ($self->send_file('moderate', \@rcpt, $self->{'domain'}, $param)) {
......
......@@ -231,10 +231,15 @@ sub mail_file {
$headers .= "\n";
}
## All these data provide mail attachements in service messages
my @msgs = ();
if (ref($data->{'msg_list'}) eq 'ARRAY') {
@msgs = map {$_->{'msg'} || $_->{'full_msg'}} @{$data->{'msg_list'}};
} elsif ($data->{'msg'} and open IN, '<'.$data->{'msg'}) {
} elsif ($data->{'spool'}) {
@msgs = @{$data->{'spool'}};
} elsif ($data->{'msg'}) {
push @msgs, $data->{'msg'};
} elsif ($data->{'msg_path'} and open IN, '<'.$data->{'msg_path'}) {
push @msgs, join('', <IN>);
close IN;
} elsif ($data->{'file'} and open IN, '<'.$data->{'file'}) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment