File: includes/functions_privmsgs.php
Unmodified
Added
Modified
Removed
Line 889 | Line 889 |
---|
SET pm_unread = 0 WHERE msg_id = $msg_id AND user_id = $user_id
|
SET pm_unread = 0 WHERE msg_id = $msg_id AND user_id = $user_id
|
AND folder_id = $folder_id";
| AND folder_id = $folder_id AND pm_unread = 1";
|
$db->sql_query($sql);
|
$db->sql_query($sql);
|
| // If the message is already marked as read, we just skip the rest to avoid negative PM count if (!$db->sql_affectedrows()) { return; }
|
$sql = 'UPDATE ' . USERS_TABLE . " SET user_unread_privmsg = user_unread_privmsg - 1
| $sql = 'UPDATE ' . USERS_TABLE . " SET user_unread_privmsg = user_unread_privmsg - 1
|
Line 1594 | Line 1601 |
---|
'percent' => ($user->data['message_limit']) ? (($user->data['message_limit'] > 0) ? floor(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100) : 0, );
|
'percent' => ($user->data['message_limit']) ? (($user->data['message_limit'] > 0) ? floor(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100) : 0, );
|
$return['message'] = $user->lang('FOLDER_STATUS_MSG', $user->lang('MESSAGES_COUNT', (int) $return['max']), $return['cur'], $return['percent']);
| $return['message'] = $user->lang('FOLDER_STATUS_MSG', $user->lang('MESSAGES_COUNT', (int) $return['max']), (int) $return['cur'], $return['percent']);
|
return $return; }
| return $return; }
|