Skip to content

Commit

Permalink
When closed list is restored, subscribers won't be restored (sympa-co…
Browse files Browse the repository at this point in the history
  • Loading branch information
ikedas committed Apr 16, 2022
1 parent f71f5ce commit 7d0504c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/lib/Sympa/List.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3221,16 +3221,21 @@ sub add_list_member {
}
next unless @set_list;

# For backward compatibility, this column may not be NULL.
unless (grep {$_ eq 'number_messages_subscriber'} @set_list) {
push @set_list, 'number_messages_subscriber';
push @val_list, 0;
}

# Update subscriber table.
my $sth;
unless (
$sdm
and $sth = $sdm->do_prepared_query(
sprintf(
q{INSERT INTO subscriber_table
(%s, list_subscriber, robot_subscriber,
number_messages_subscriber)
SELECT %s, ?, ?, 0
(%s, list_subscriber, robot_subscriber)
SELECT %s, ?, ?
FROM dual
WHERE NOT EXISTS (
SELECT 1
Expand Down

0 comments on commit 7d0504c

Please sign in to comment.