1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

2.0.18 changes

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@5283 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2005-10-30 15:17:14 +00:00
parent 37f67fdea9
commit 9b9618f2dd
30 changed files with 503 additions and 178 deletions

View File

@@ -295,7 +295,7 @@ else if ( $mode == 'read' )
if ( $sent_info = $db->sql_fetchrow($result) )
{
if ( $sent_info['sent_items'] >= $board_config['max_sentbox_privmsgs'] )
if ($board_config['max_sentbox_privmsgs'] && $sent_info['sent_items'] >= $board_config['max_sentbox_privmsgs'])
{
$sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . "
WHERE privmsgs_type = " . PRIVMSGS_SENT_MAIL . "
@@ -911,7 +911,7 @@ else if ( $save && $mark_list && $folder != 'savebox' && $folder != 'outbox' )
if ( $saved_info = $db->sql_fetchrow($result) )
{
if ( $saved_info['savebox_items'] >= $board_config['max_savebox_privmsgs'] )
if ($board_config['max_savebox_privmsgs'] && $saved_info['savebox_items'] >= $board_config['max_savebox_privmsgs'] )
{
$sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . "
WHERE ( ( privmsgs_to_userid = " . $userdata['user_id'] . "
@@ -1138,6 +1138,27 @@ else if ( $submit || $refresh || $mode != '' )
//
}
if ($submit && $mode == 'edit')
{
$sql = 'SELECT privmsgs_from_userid
FROM ' . PRIVMSGS_TABLE . '
WHERE privmsgs_id = ' . (int) $privmsg_id . '
AND privmsgs_from_userid = ' . $userdata['user_id'];
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, "Could not obtain message details", "", __LINE__, __FILE__, $sql);
}
if (!($row = $db->sql_fetchrow($result)))
{
message_die(GENERAL_MESSAGE, $lang['No_such_post']);
}
$db->sql_freeresult($result);
unset($row);
}
if ( $submit )
{
if ( !empty($HTTP_POST_VARS['username']) )
@@ -1154,7 +1175,11 @@ else if ( $submit || $refresh || $mode != '' )
$error_msg = $lang['No_such_user'];
}
$to_userdata = $db->sql_fetchrow($result);
if (!($to_userdata = $db->sql_fetchrow($result)))
{
$error = TRUE;
$error_msg = $lang['No_such_user'];
}
}
else
{
@@ -1222,7 +1247,7 @@ else if ( $submit || $refresh || $mode != '' )
if ( $inbox_info = $db->sql_fetchrow($result) )
{
if ( $inbox_info['inbox_items'] >= $board_config['max_inbox_privmsgs'] )
if ($board_config['max_inbox_privmsgs'] && $inbox_info['inbox_items'] >= $board_config['max_inbox_privmsgs'])
{
$sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . "
WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
@@ -1424,8 +1449,7 @@ else if ( $submit || $refresh || $mode != '' )
$to_username = $row['username'];
}
}
if ( $mode == 'edit' )
else if ( $mode == 'edit' )
{
$sql = "SELECT pm.*, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text, u.username, u.user_id, u.user_sig
FROM " . PRIVMSGS_TABLE . " pm, " . PRIVMSGS_TEXT_TABLE . " pmt, " . USERS_TABLE . " u
@@ -1506,7 +1530,7 @@ else if ( $submit || $refresh || $mode != '' )
}
else
{
$privmsg_subject = $privmsg_message = '';
$privmsg_subject = $privmsg_message = $to_username = '';
}
}
@@ -1799,7 +1823,6 @@ else if ( $submit || $refresh || $mode != '' )
'S_BBCODE_CHECKED' => ( !$bbcode_on ) ? ' checked="checked"' : '',
'S_SMILIES_CHECKED' => ( !$smilies_on ) ? ' checked="checked"' : '',
'S_SIGNATURE_CHECKED' => ( $attach_sig ) ? ' checked="checked"' : '',
'S_NAMES_SELECT' => $user_names_select,
'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields,
'S_POST_ACTION' => append_sid("privmsg.$phpEx"),