Unverified Commit 7df48b8e authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #1381 from ikedas/issue-1380 by ikedas

When closed list is restored, subscribers won't be restored (#1380)
parents 66bf5808 e88f84d9
...@@ -3205,6 +3205,9 @@ sub add_list_member { ...@@ -3205,6 +3205,9 @@ sub add_list_member {
} }
} }
# For backward compat., this column is required and cannot be NULL.
$values->{number_messages} //= 0;
#Log in stat_table to make statistics #Log in stat_table to make statistics
$log->add_stat( $log->add_stat(
'robot' => $self->{'domain'}, 'robot' => $self->{'domain'},
...@@ -3240,9 +3243,8 @@ sub add_list_member { ...@@ -3240,9 +3243,8 @@ sub add_list_member {
and $sth = $sdm->do_prepared_query( and $sth = $sdm->do_prepared_query(
sprintf( sprintf(
q{INSERT INTO subscriber_table q{INSERT INTO subscriber_table
(%s, list_subscriber, robot_subscriber, (%s, list_subscriber, robot_subscriber)
number_messages_subscriber) SELECT %s, ?, ?
SELECT %s, ?, ?, 0
FROM dual FROM dual
WHERE NOT EXISTS ( WHERE NOT EXISTS (
SELECT 1 SELECT 1
......
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