mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 20:08:55 +00:00
[ticket/10605] Use unset() instead of checking user_id over and over again.
PHPBB3-10605
This commit is contained in:
parent
ba6943a6a0
commit
e8830f605f
1 changed files with 1 additions and 5 deletions
|
@ -1134,13 +1134,9 @@ function phpbb_delete_user_pms($user_id)
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unset($undelivered_user[$user_id]);
|
||||||
foreach ($undelivered_user as $_user_id => $ary)
|
foreach ($undelivered_user as $_user_id => $ary)
|
||||||
{
|
{
|
||||||
if ($_user_id == $user_id)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||||
SET user_new_privmsg = user_new_privmsg - ' . sizeof($ary) . ',
|
SET user_new_privmsg = user_new_privmsg - ' . sizeof($ary) . ',
|
||||||
user_unread_privmsg = user_unread_privmsg - ' . sizeof($ary) . '
|
user_unread_privmsg = user_unread_privmsg - ' . sizeof($ary) . '
|
||||||
|
|
Loading…
Add table
Reference in a new issue