From dd53d0576d8256e37074cc23dd5b9769acc12d1a Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 27 Mar 2012 01:39:49 +0200 Subject: [PATCH] [ticket/10605] Remove unnecessary $delete_ids array. PHPBB3-10605 --- phpBB/includes/functions_privmsgs.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 00029a1986..23f582641b 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -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); }