diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-06-23 10:43:43 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-06-23 10:43:43 +0200 |
commit | 9c2930178f37ed881055da3e65286704a3a8220e (patch) | |
tree | fdd21615ae1e540bb72f1e08cbea22712413b10d /phpBB | |
parent | a50d1a3576b9e92dfbcfc5bb951e2985ae1872a1 (diff) | |
download | forums-9c2930178f37ed881055da3e65286704a3a8220e.tar forums-9c2930178f37ed881055da3e65286704a3a8220e.tar.gz forums-9c2930178f37ed881055da3e65286704a3a8220e.tar.bz2 forums-9c2930178f37ed881055da3e65286704a3a8220e.tar.xz forums-9c2930178f37ed881055da3e65286704a3a8220e.zip |
[ticket/10950] Use a variable for the private message id.
PHPBB3-10950
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/functions_privmsgs.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index cdfde4c7ea..d77d46d46d 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1113,10 +1113,13 @@ function phpbb_delete_user_pms($user_id) while ($row = $db->sql_fetchrow($result)) { + $msg_id = (int) $row['msg_id']; + $delete_ids[$msg_id] = $msg_id; + if ($row['author_id'] == $user_id && $row['folder_id'] == PRIVMSGS_NO_BOX) { // Undelivered messages - $undelivered_msg[] = $row['msg_id']; + $undelivered_msg[] = $msg_id; if (isset($undelivered_user[$row['user_id']])) { @@ -1127,8 +1130,6 @@ function phpbb_delete_user_pms($user_id) $undelivered_user[$row['user_id']] = 1; } } - - $delete_ids[(int) $row['msg_id']] = (int) $row['msg_id']; } $db->sql_freeresult($result); @@ -1141,8 +1142,11 @@ function phpbb_delete_user_pms($user_id) while ($row = $db->sql_fetchrow($result)) { + $msg_id = (int) $row['msg_id']; + $delete_ids[$msg_id] = $msg_id; + // Undelivered messages - $undelivered_msg[] = $row['msg_id']; + $undelivered_msg[] = $msg_id; if (isset($undelivered_user[$row['user_id']])) { @@ -1152,8 +1156,6 @@ function phpbb_delete_user_pms($user_id) { $undelivered_user[$row['user_id']] = 1; } - - $delete_ids[(int) $row['msg_id']] = (int) $row['msg_id']; } $db->sql_freeresult($result); |