mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/10950] Check $delete_ids to be not empty
PHPBB3-10950
This commit is contained in:
parent
5c8c7b1352
commit
338d29072f
1 changed files with 25 additions and 22 deletions
|
@ -1216,6 +1216,8 @@ function phpbb_delete_user_pms($user_id)
|
||||||
WHERE user_id = ' . (int) $user_id;
|
WHERE user_id = ' . (int) $user_id;
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
if (!empty($delete_ids))
|
||||||
|
{
|
||||||
// Now we have to check which messages we can delete completely
|
// Now we have to check which messages we can delete completely
|
||||||
$sql = 'SELECT msg_id
|
$sql = 'SELECT msg_id
|
||||||
FROM ' . PRIVMSGS_TO_TABLE . '
|
FROM ' . PRIVMSGS_TO_TABLE . '
|
||||||
|
@ -1242,6 +1244,7 @@ function phpbb_delete_user_pms($user_id)
|
||||||
WHERE ' . $db->sql_in_set('msg_id', $delete_ids);
|
WHERE ' . $db->sql_in_set('msg_id', $delete_ids);
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Set the remaining author id to anonymous
|
// Set the remaining author id to anonymous
|
||||||
// This way users are still able to read messages from users being removed
|
// This way users are still able to read messages from users being removed
|
||||||
|
|
Loading…
Add table
Reference in a new issue