Commit 7de3d32b authored by sikeda's avatar sikeda
Browse files

[-dev] perltidy'ing.

git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12581 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 550151fc
......@@ -10129,9 +10129,12 @@ sub do_send_me {
}
 
my $spindle = Sympa::Spindle::ResendArchive->new(
resent_by => $param->{'user'}{'email'},
context => $list, arc => "$in{'yyyy'}-$in{'month'}",
message_id => $message_id, quiet => 1);
resent_by => $param->{'user'}{'email'},
context => $list,
arc => "$in{'yyyy'}-$in{'month'}",
message_id => $message_id,
quiet => 1
);
 
unless ($spindle and $spindle->spin) {
wwslog('info', 'No file match msgid');
......@@ -10139,20 +10142,20 @@ sub do_send_me {
return undef;
} elsif ($spindle->{finish} and $spindle->{finish} eq 'success') {
wwslog(
'info', 'Message %s spooled for %s',
'info', 'Message %s spooled for %s',
$message_id, $param->{'user'}{'email'}
);
Sympa::Report::notice_report_web('performed', {}, $param->{'action'});
$in{'month'} = $in{'yyyy'} . "-" . $in{'month'};
return 'arc';
} else {
$param->{'status'} = 'message_err';
wwslog(
'err',
'Impossible to send archive file to %s',
$param->{'user'}{'email'}
);
return undef;
$param->{'status'} = 'message_err';
wwslog(
'err',
'Impossible to send archive file to %s',
$param->{'user'}{'email'}
);
return undef;
}
 
return 1;
......
......@@ -87,8 +87,8 @@ sub _twist {
my $self = shift;
my $message = shift;
my $message_id =
tools::clean_msg_id($message->get_header('Message-Id')) || '';
my $message_id = tools::clean_msg_id($message->get_header('Message-Id'))
|| '';
return 0 unless $message_id eq $self->{message_id};
# Decrpyt message.
......
......@@ -78,4 +78,3 @@ L<Sympa::Spool::Digest>.
L<Sympa::Spindle::ToDigest> appeared on Sympa 6.2.13.
=cut
......@@ -156,77 +156,77 @@ sub _send_msg {
my $list = $message->{context};
my $verp_rate;
my $tags_to_use;
my $available_recipients;
unless ($resent_by) { # Not in ResendArchive spindle.
# Synchronize list members, required if list uses include sources
# unless sync_include has been performed recently.
if ($list->has_include_data_sources()) {
unless (defined $list->on_the_fly_sync_include(use_ttl => 1)) {
$log->syslog('notice', 'Unable to synchronize list %s', $list);
#FIXME: Might be better to abort if synchronization failed.
my $verp_rate;
my $tags_to_use;
my $available_recipients;
unless ($resent_by) { # Not in ResendArchive spindle.
# Synchronize list members, required if list uses include sources
# unless sync_include has been performed recently.
if ($list->has_include_data_sources()) {
unless (defined $list->on_the_fly_sync_include(use_ttl => 1)) {
$log->syslog('notice', 'Unable to synchronize list %s',
$list);
#FIXME: Might be better to abort if synchronization failed.
}
}
}
# Blindly send the message to all users.
# Blindly send the message to all users.
my $total = $list->get_total('nocache');
unless ($total and 0 < $total) {
$log->syslog('info', 'No subscriber in list %s', $list);
$list->savestats;
return 0;
}
my $total = $list->get_total('nocache');
unless ($total and 0 < $total) {
$log->syslog('info', 'No subscriber in list %s', $list);
$list->savestats;
return 0;
}
# Postpone delivery if delivery time is specified.
my $delivery_date = $list->get_next_delivery_date;
$message->{date} = $delivery_date if defined $delivery_date;
# Bounce rate.
my $rate = $list->get_total_bouncing() * 100 / $total;
if ($rate > $list->{'admin'}{'bounce'}{'warn_rate'}) {
$list->send_notify_to_owner('bounce_rate', {'rate' => $rate});
if (100 <= $rate) {
Sympa::send_notify_to_user($list, 'hundred_percent_error',
$message->{sender});
Sympa::send_notify_to_listmaster($list, 'hundred_percent_error',
{sender => $message->{sender}});
# Postpone delivery if delivery time is specified.
my $delivery_date = $list->get_next_delivery_date;
$message->{date} = $delivery_date if defined $delivery_date;
# Bounce rate.
my $rate = $list->get_total_bouncing() * 100 / $total;
if ($rate > $list->{'admin'}{'bounce'}{'warn_rate'}) {
$list->send_notify_to_owner('bounce_rate', {'rate' => $rate});
if (100 <= $rate) {
Sympa::send_notify_to_user($list, 'hundred_percent_error',
$message->{sender});
Sympa::send_notify_to_listmaster($list,
'hundred_percent_error', {sender => $message->{sender}});
}
}
}
# Prepare verp parameter.
$verp_rate = $list->{'admin'}{'verp_rate'};
# Force VERP if tracking is requested.
$verp_rate = '100%'
if Sympa::Tools::Data::smart_eq($message->{shelved}{tracking},
qr/dsn|mdn/);
# Define messages which can be tagged as first or last according to the
# VERP rate.
# If the VERP is 100%, then all the messages are VERP. Don't try to tag
# not VERP messages as they won't even exist.
if ($verp_rate eq '0%') {
$tags_to_use = {tag_verp => '0', tag_noverp => 'z'};
} else {
$tags_to_use = {tag_verp => 'z', tag_noverp => '0'};
}
# Prepare verp parameter.
$verp_rate = $list->{'admin'}{'verp_rate'};
# Force VERP if tracking is requested.
$verp_rate = '100%'
if Sympa::Tools::Data::smart_eq($message->{shelved}{tracking},
qr/dsn|mdn/);
# Define messages which can be tagged as first or last according to the
# VERP rate.
# If the VERP is 100%, then all the messages are VERP. Don't try to tag
# not VERP messages as they won't even exist.
if ($verp_rate eq '0%') {
$tags_to_use = {tag_verp => '0', tag_noverp => 'z'};
} else {
$tags_to_use = {tag_verp => 'z', tag_noverp => '0'};
}
# Separate subscribers depending on user reception option and also if
# VERP a dicovered some bounce for them.
# Storing the not empty subscribers' arrays into a hash.
$available_recipients = $list->get_recipients_per_mode($message);
unless ($available_recipients) {
$log->syslog('info', 'No subscriber for sending msg in list %s',
$list);
$list->savestats;
return 0;
# Separate subscribers depending on user reception option and also if
# VERP a dicovered some bounce for them.
# Storing the not empty subscribers' arrays into a hash.
$available_recipients = $list->get_recipients_per_mode($message);
unless ($available_recipients) {
$log->syslog('info', 'No subscriber for sending msg in list %s',
$list);
$list->savestats;
return 0;
}
} else {
$verp_rate = '0%';
$tags_to_use = {tag_verp => '0', tag_noverp => 'z',};
$available_recipients = {mail => {noverp => [$resent_by]}};
}
} else {
$verp_rate = '0%';
$tags_to_use = { tag_verp => '0', tag_noverp => 'z', };
$available_recipients =
{ mail => { noverp => [$resent_by] } };
}
my $numstored = 0;
......
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