Commit 22827cb3 authored by sikeda's avatar sikeda
Browse files

[-dev] Copyedit.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12660 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 9ac78d97
......@@ -138,20 +138,8 @@ sub _twist {
$request->{quiet} ||= ($action =~ /,\s*quiet\b/i);
return ['Sympa::Spindle::ToRequest'];
} elsif ($action =~ /\Areject\b/i) {
if (defined $result->{'tt2'}) {
unless (
Sympa::send_file(
$that, $result->{'tt2'},
$sender, {'auto_submitted' => 'auto-replied'}
)
) {
$log->syslog('notice', 'Unable to send template "%s" to %s',
$result->{'tt2'}, $sender);
$self->add_stash($request, 'auth', $result->{'reason'});
}
} else {
$self->add_stash($request, 'auth', $result->{'reason'});
}
$self->add_stash($request, 'auth', $result->{'reason'},
{template => $result->{'tt2'}});
$log->syslog(
'info',
'%s for %s from %s refused (not allowed)',
......
......@@ -1355,17 +1355,8 @@ sub invite {
Time::HiRes::time() - $self->{start_time},
$list->get_total()
);
if (defined $result->{'tt2'}) {
unless (Sympa::send_file($list, $result->{'tt2'}, $sender, {})) {
$log->syslog('notice', 'Unable to send template "%s" to %s',
$result->{'tt2'}, $sender);
$self->add_stash($request, 'auth', $result->{'reason'},
{'email' => $email});
}
} else {
$self->add_stash($request, 'auth', $result->{'reason'},
{'email' => $email});
}
$self->add_stash($request, 'auth', $result->{'reason'},
{'email' => $email, template => $result->{'tt2'}});
}
return 1;
......
......@@ -200,6 +200,17 @@ sub _send_report {
my ($request, $type, $error, $params) = @$report;
my %data = %{$params || {}};
# Special case for "reject(tt2=TEMPLATE)".
if ( $type eq 'auth'
and $data{template}
and Sympa::send_file(
$request->{context}, $data{template},
$sender, {auto_submitted => 'auto-replied'}
)
) {
next;
}
$data{type} = $type;
$data{cmd} = $request->{cmd_line};
$data{email} ||= $request->{email};
......
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