@@ -7550,27 +7550,24 @@ sub do_distribute {
7550
7550
7551
7551
my @ids = split /\0/, $in{'id'};
7552
7552
$param->{'id'} = [@ids];
7553
- my @topics = grep { defined $_ and length $_ } split /\0/, $in{'topic'};
7553
+ my @topics =
7554
+ grep { $list->is_available_msg_topic($_) } split /\0/, $in{'topic'};
7554
7555
$param->{'topic'} = [@topics];
7555
7556
$param->{'topic_required'} =
7556
7557
($list->is_there_msg_topic and $list->is_msg_topic_tagging_required);
7557
7558
7558
7559
# Action confirmed?
7559
- if ($param->{'topic_required'}) {
7560
- my $response_action = (
7561
- @topics # Topics are required.
7562
- or ($in{'response_action'}
7563
- and $in{'response_action'} eq 'cancel')
7564
- )
7565
- ? $in{'response_action'}
7566
- : undef;
7567
- my $next_action = $session->confirm_action(
7568
- $in{'action'}, $response_action,
7569
- arg => join(',', sort @ids),
7570
- previous_action => ($in{'previous_action'} || 'modindex')
7571
- );
7572
- return $next_action unless $next_action eq '1';
7560
+ unless ('cancel' eq ($in{'response_action'} // '')) {
7561
+ # Redo confirmation if topics are required.
7562
+ undef $in{'response_action'}
7563
+ if not @topics and $param->{'topic_required'};
7573
7564
}
7565
+ my $next_action = $session->confirm_action(
7566
+ $in{'action'}, $in{'response_action'},
7567
+ arg => join(',', sort @ids),
7568
+ previous_action => ($in{'previous_action'} || 'modindex')
7569
+ );
7570
+ return $next_action unless $next_action eq '1';
7574
7571
7575
7572
# Load message list.
7576
7573
my @mail_command = ();
0 commit comments