diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-03-27 01:18:02 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-03-27 01:18:02 +0200 |
commit | e8830f605f73a0c8fa5c3ea579ee18f295b81600 (patch) | |
tree | abe608aa0dec9cd405e51f1bc6fd8c8d7a0688ff /phpBB/includes | |
parent | ba6943a6a0ea50af772dc6e94f13b56292cd9f37 (diff) | |
download | forums-e8830f605f73a0c8fa5c3ea579ee18f295b81600.tar forums-e8830f605f73a0c8fa5c3ea579ee18f295b81600.tar.gz forums-e8830f605f73a0c8fa5c3ea579ee18f295b81600.tar.bz2 forums-e8830f605f73a0c8fa5c3ea579ee18f295b81600.tar.xz forums-e8830f605f73a0c8fa5c3ea579ee18f295b81600.zip |
[ticket/10605] Use unset() instead of checking user_id over and over again.
PHPBB3-10605
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions_privmsgs.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 34f16ea9da..59dea50094 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1134,13 +1134,9 @@ function phpbb_delete_user_pms($user_id) $db->sql_query($sql); } + unset($undelivered_user[$user_id]); foreach ($undelivered_user as $_user_id => $ary) { - if ($_user_id == $user_id) - { - continue; - } - $sql = 'UPDATE ' . USERS_TABLE . ' SET user_new_privmsg = user_new_privmsg - ' . sizeof($ary) . ', user_unread_privmsg = user_unread_privmsg - ' . sizeof($ary) . ' |