diff options
Diffstat (limited to 'phpBB/includes/ucp/ucp_pm.php')
-rw-r--r-- | phpBB/includes/ucp/ucp_pm.php | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php index 9ad6766ee8..3d6c287bab 100644 --- a/phpBB/includes/ucp/ucp_pm.php +++ b/phpBB/includes/ucp/ucp_pm.php @@ -253,28 +253,7 @@ class ucp_pm if ($user->data['user_new_privmsg'] && $action == 'view_folder') { - $return = place_pm_into_folder($global_privmsgs_rules, $release); - $num_not_moved = $return['not_moved']; - - // Make sure num_not_moved is valid. - if ($user->data['user_new_privmsg'] < 0 || $num_not_moved < 0) - { - $sql = 'UPDATE ' . USERS_TABLE . ' - SET user_new_privmsg = 0, user_unread_privmsg = 0 - WHERE user_id = ' . $user->data['user_id']; - $db->sql_query($sql); - - $num_not_moved = $user->data['user_new_privmsg'] = $user->data['user_unread_privmsg'] = 0; - } - - // Assign the number of private messages being removed due to rules. - $num_removed = $return['deleted']; - } - - // If user released the message, we will re-calculate the statistics (again) - if ($release) - { - fix_pm_counts(); + list($num_not_moved, $num_removed) = each(place_pm_into_folder($global_privmsgs_rules, $release)); } if (!$msg_id && $folder_id == PRIVMSGS_NO_BOX) |