1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 20:13:22 +01:00

[ticket/10605] Use unset() instead of checking user_id over and over again.

PHPBB3-10605
This commit is contained in:
Andreas Fischer 2012-03-27 01:18:02 +02:00
parent ba6943a6a0
commit e8830f605f

View File

@ -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) . '