1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 03:04:09 +02:00

- fix images off, css on problem for post/reply buttons

- changed calculating new/unread pm count to no longer rely on code logic, but apply all rules, operate on messages and then re-calculating after delivery.


git-svn-id: file:///svn/phpbb/trunk@8229 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-11-06 11:15:38 +00:00
parent 5abe1ea4fe
commit ac88c61e63
8 changed files with 43 additions and 108 deletions

View File

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