Skip to content

Commit

Permalink
WWSynmpa: [bug] do_distribute: Confirmation was not always performed
Browse files Browse the repository at this point in the history
  • Loading branch information
ikedas committed Sep 4, 2024
1 parent 4a844b4 commit a8434aa
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions src/cgi/wwsympa.fcgi.in
Original file line number Diff line number Diff line change
Expand Up @@ -7887,27 +7887,24 @@ sub do_distribute {

my @ids = split /\0/, $in{'id'};
$param->{'id'} = [@ids];
my @topics = grep { defined $_ and length $_ } split /\0/, $in{'topic'};
my @topics =
grep { $list->is_available_msg_topic($_) } split /\0/, $in{'topic'};
$param->{'topic'} = [@topics];
$param->{'topic_required'} =
($list->is_there_msg_topic and $list->is_msg_topic_tagging_required);

# Action confirmed?
if ($param->{'topic_required'}) {
my $response_action = (
@topics # Topics are required.
or ($in{'response_action'}
and $in{'response_action'} eq 'cancel')
)
? $in{'response_action'}
: undef;
my $next_action = $session->confirm_action(
$in{'action'}, $response_action,
arg => join(',', sort @ids),
previous_action => ($in{'previous_action'} || 'modindex')
);
return $next_action unless $next_action eq '1';
unless ('cancel' eq ($in{'response_action'} // '')) {
# Redo confirmation if topics are required.
undef $in{'response_action'}
if not @topics and $param->{'topic_required'};
}
my $next_action = $session->confirm_action(
$in{'action'}, $in{'response_action'},
arg => join(',', sort @ids),
previous_action => ($in{'previous_action'} || 'modindex')
);
return $next_action unless $next_action eq '1';

# Load message list.
my @mail_command = ();
Expand Down

0 comments on commit a8434aa

Please sign in to comment.