mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-09 21:08:53 +00:00
[ticket/10605] Remove unnecessary $delete_ids array.
PHPBB3-10605
This commit is contained in:
parent
9040f18d7c
commit
dd53d0576d
1 changed files with 3 additions and 5 deletions
|
@ -1169,9 +1169,7 @@ function phpbb_delete_user_pms($user_id)
|
|||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$delete_ids = array_keys($delete_rows);
|
||||
|
||||
if (sizeof($delete_ids))
|
||||
if (!empty($delete_rows))
|
||||
{
|
||||
// Check if there are any attachments we need to remove
|
||||
if (!function_exists('delete_attachments'))
|
||||
|
@ -1179,10 +1177,10 @@ function phpbb_delete_user_pms($user_id)
|
|||
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
|
||||
delete_attachments('message', $delete_ids, false);
|
||||
delete_attachments('message', $delete_rows, false);
|
||||
|
||||
$sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('msg_id', $delete_ids);
|
||||
WHERE ' . $db->sql_in_set('msg_id', $delete_rows);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue