diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-03-27 01:39:49 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-03-27 01:39:49 +0200 |
commit | dd53d0576d8256e37074cc23dd5b9769acc12d1a (patch) | |
tree | fcc8ce96ab53148ea6853851d6d3c9d3c70a8e17 /phpBB/includes/functions_privmsgs.php | |
parent | 9040f18d7cf9de137acbac6072dc2ffd3cede1b5 (diff) | |
download | forums-dd53d0576d8256e37074cc23dd5b9769acc12d1a.tar forums-dd53d0576d8256e37074cc23dd5b9769acc12d1a.tar.gz forums-dd53d0576d8256e37074cc23dd5b9769acc12d1a.tar.bz2 forums-dd53d0576d8256e37074cc23dd5b9769acc12d1a.tar.xz forums-dd53d0576d8256e37074cc23dd5b9769acc12d1a.zip |
[ticket/10605] Remove unnecessary $delete_ids array.
PHPBB3-10605
Diffstat (limited to 'phpBB/includes/functions_privmsgs.php')
-rw-r--r-- | phpBB/includes/functions_privmsgs.php | 8 |
1 files 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); } |