mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/10950] Move array initialisation to the front.
PHPBB3-10950
This commit is contained in:
parent
2a76b7e869
commit
a50d1a3576
1 changed files with 2 additions and 1 deletions
|
@ -1103,13 +1103,14 @@ function phpbb_delete_user_pms($user_id)
|
||||||
|
|
||||||
// Get PM Information for later deleting
|
// Get PM Information for later deleting
|
||||||
// The two queries where split, so we can use our indexes
|
// The two queries where split, so we can use our indexes
|
||||||
|
$undelivered_msg = $undelivered_user = $delete_ids = array();
|
||||||
|
|
||||||
// Part 1: get PMs the user received
|
// Part 1: get PMs the user received
|
||||||
$sql = 'SELECT msg_id, author_id, folder_id, pm_unread, pm_new
|
$sql = 'SELECT msg_id, author_id, folder_id, pm_unread, pm_new
|
||||||
FROM ' . PRIVMSGS_TO_TABLE . '
|
FROM ' . PRIVMSGS_TO_TABLE . '
|
||||||
WHERE user_id = ' . $user_id;
|
WHERE user_id = ' . $user_id;
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$undelivered_msg = $undelivered_user = $delete_ids = array();
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
if ($row['author_id'] == $user_id && $row['folder_id'] == PRIVMSGS_NO_BOX)
|
if ($row['author_id'] == $user_id && $row['folder_id'] == PRIVMSGS_NO_BOX)
|
||||||
|
|
Loading…
Add table
Reference in a new issue