mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Fix bug #496014 and fixed a problem with the Inbox size limit not being adhered to.
git-svn-id: file:///svn/phpbb/trunk@1700 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
c44e2fbf6b
commit
c4ecbe19cd
1 changed files with 20 additions and 7 deletions
|
@ -56,7 +56,19 @@ $refresh = $preview || $submit_search;
|
||||||
|
|
||||||
$mark_list = ( !empty($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : 0;
|
$mark_list = ( !empty($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : 0;
|
||||||
|
|
||||||
$folder = ( !empty($HTTP_POST_VARS['folder']) ) ? $HTTP_POST_VARS['folder'] : ( (!empty($HTTP_GET_VARS['folder'])) ? $HTTP_GET_VARS['folder'] : "inbox" );
|
if( isset($HTTP_POST_VARS['folder']) || isset($HTTP_GET_VARS['folder']) )
|
||||||
|
{
|
||||||
|
$folder = ( isset($HTTP_POST_VARS['folder']) ) ? $HTTP_POST_VARS['folder'] : $HTTP_GET_VARS['folder'];
|
||||||
|
|
||||||
|
if( $folder != "inbox" && $folder != "outbox" && $folder != "sentbox" && $folder != "savebox" )
|
||||||
|
{
|
||||||
|
$folder = "inbox";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$folder = "inbox";
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Cancel
|
// Cancel
|
||||||
|
@ -290,7 +302,7 @@ else if( $mode == "read" )
|
||||||
{
|
{
|
||||||
$sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . "
|
$sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . "
|
||||||
WHERE privmsgs_type = " . PRIVMSGS_SENT_MAIL . "
|
WHERE privmsgs_type = " . PRIVMSGS_SENT_MAIL . "
|
||||||
AND privmsgs_date <= " . $sent_info['oldest_post_time'] . "
|
AND privmsgs_date = " . $sent_info['oldest_post_time'] . "
|
||||||
AND privmsgs_from_userid = " . $privmsg['privmsgs_from_userid'];
|
AND privmsgs_from_userid = " . $privmsg['privmsgs_from_userid'];
|
||||||
if( !$result = $db->sql_query($sql) )
|
if( !$result = $db->sql_query($sql) )
|
||||||
{
|
{
|
||||||
|
@ -967,7 +979,7 @@ else if( $submit || $refresh || $mode != "" )
|
||||||
FROM " . PRIVMSGS_TABLE . "
|
FROM " . PRIVMSGS_TABLE . "
|
||||||
WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
|
WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
|
||||||
OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " )
|
OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " )
|
||||||
AND privmsgs_from_userid = " . $to_userdata['user_id'];
|
AND privmsgs_to_userid = " . $to_userdata['user_id'];
|
||||||
if( !$result = $db->sql_query($sql) )
|
if( !$result = $db->sql_query($sql) )
|
||||||
{
|
{
|
||||||
message_die(GENERAL_MESSAGE, $lang['No_such_user']);
|
message_die(GENERAL_MESSAGE, $lang['No_such_user']);
|
||||||
|
@ -982,7 +994,8 @@ else if( $submit || $refresh || $mode != "" )
|
||||||
if( $inbox_info['inbox_items'] > $board_config['max_inbox_privmsgs'] )
|
if( $inbox_info['inbox_items'] > $board_config['max_inbox_privmsgs'] )
|
||||||
{
|
{
|
||||||
$sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . "
|
$sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . "
|
||||||
WHERE privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
|
WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
|
||||||
|
OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " )
|
||||||
AND privmsgs_date = " . $inbox_info['oldest_post_time'] . "
|
AND privmsgs_date = " . $inbox_info['oldest_post_time'] . "
|
||||||
AND privmsgs_to_userid = " . $to_userdata['user_id'];
|
AND privmsgs_to_userid = " . $to_userdata['user_id'];
|
||||||
if( !$result = $db->sql_query($sql) )
|
if( !$result = $db->sql_query($sql) )
|
||||||
|
|
Loading…
Add table
Reference in a new issue