mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Fixed: "$config['allow_quote']"? No sir, there is no such thing. (my bad)
Changed: do not perform flood check when disabled Added: a couple notes for Acyd ;) git-svn-id: file:///svn/phpbb/trunk@4696 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
84ede6d436
commit
eb7cc50608
1 changed files with 18 additions and 4 deletions
|
@ -376,7 +376,7 @@ $bbcode_status = ($config['allow_bbcode'] && $auth->acl_get('f_bbcode', $forum_i
|
||||||
$smilies_status = ($config['allow_smilies'] && $auth->acl_get('f_smilies', $forum_id)) ? TRUE : FALSE;
|
$smilies_status = ($config['allow_smilies'] && $auth->acl_get('f_smilies', $forum_id)) ? TRUE : FALSE;
|
||||||
$img_status = ($auth->acl_get('f_img', $forum_id)) ? TRUE : FALSE;
|
$img_status = ($auth->acl_get('f_img', $forum_id)) ? TRUE : FALSE;
|
||||||
$flash_status = ($auth->acl_get('f_flash', $forum_id)) ? TRUE : FALSE;
|
$flash_status = ($auth->acl_get('f_flash', $forum_id)) ? TRUE : FALSE;
|
||||||
$quote_status = ($config['allow_quote'] && $auth->acl_get('f_quote', $forum_id)) ? TRUE : FALSE;
|
$quote_status = ($auth->acl_get('f_quote', $forum_id)) ? TRUE : FALSE;
|
||||||
|
|
||||||
// Bump Topic
|
// Bump Topic
|
||||||
if ($mode == 'bump' && ($bump_time = bump_topic_allowed($forum_id, $topic_bumped, $topic_last_post_time, $topic_poster, $topic_last_poster_id)))
|
if ($mode == 'bump' && ($bump_time = bump_topic_allowed($forum_id, $topic_bumped, $topic_last_post_time, $topic_poster, $topic_last_poster_id)))
|
||||||
|
@ -576,12 +576,12 @@ if ($submit || $preview || $refresh)
|
||||||
if ($mode != 'edit' || $message_md5 != $post_checksum || $status_switch || $preview)
|
if ($mode != 'edit' || $message_md5 != $post_checksum || $status_switch || $preview)
|
||||||
{
|
{
|
||||||
// Parse message
|
// Parse message
|
||||||
$message_parser->parse($enable_html, $enable_bbcode, $enable_urls, $enable_smilies, $img_status, $flash_status, $auth->acl_get('f_quote', $forum_id));
|
$message_parser->parse($enable_html, $enable_bbcode, $enable_urls, $enable_smilies, $img_status, $flash_status, $quote_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
$message_parser->parse_attachments($mode, $post_id, $submit, $preview, $refresh);
|
$message_parser->parse_attachments($mode, $post_id, $submit, $preview, $refresh);
|
||||||
|
|
||||||
if ($mode != 'edit' && !$preview && !$refresh && !$auth->acl_get('f_ignoreflood', $forum_id))
|
if ($mode != 'edit' && !$preview && !$refresh && $config['flood_interval'] && !$auth->acl_get('f_ignoreflood', $forum_id))
|
||||||
{
|
{
|
||||||
// Flood check
|
// Flood check
|
||||||
if ($user->data['user_id'] != ANONYMOUS)
|
if ($user->data['user_id'] != ANONYMOUS)
|
||||||
|
@ -592,6 +592,13 @@ if ($submit || $preview || $refresh)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// NOTE: probably faster (to be tested) -- Ashe
|
||||||
|
// a compound index on (poster_ip, post_time) might help too
|
||||||
|
$sql = 'SELECT post_time AS last_post_time
|
||||||
|
FROM ' . POSTS_TABLE . "
|
||||||
|
WHERE poster_ip = '" . $user->ip . "'
|
||||||
|
AND post_time > " . ($current_time - $config['flood_interval']);
|
||||||
|
|
||||||
$sql = 'SELECT MAX(post_time) AS last_post_time
|
$sql = 'SELECT MAX(post_time) AS last_post_time
|
||||||
FROM ' . POSTS_TABLE . "
|
FROM ' . POSTS_TABLE . "
|
||||||
WHERE poster_ip = '" . $user->ip . "'";
|
WHERE poster_ip = '" . $user->ip . "'";
|
||||||
|
@ -1455,7 +1462,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||||
|
|
||||||
'U_POST_ID' => $row['post_id'],
|
'U_POST_ID' => $row['post_id'],
|
||||||
'U_MINI_POST' => "{$phpbb_root_path}viewtopic.$phpEx$SID&p=" . $row['post_id'] . '#' . $row['post_id'],
|
'U_MINI_POST' => "{$phpbb_root_path}viewtopic.$phpEx$SID&p=" . $row['post_id'] . '#' . $row['post_id'],
|
||||||
'U_QUOTE' => ($auth->acl_get('f_quote', $forum_id)) ? 'javascript:addquote(' . $row['post_id'] . ", '" . str_replace("'", "\\'", $poster) . "')" : '',
|
'U_QUOTE' => ($quote_status) ? 'javascript:addquote(' . $row['post_id'] . ", '" . str_replace("'", "\\'", $poster) . "')" : '',
|
||||||
|
|
||||||
'S_ROW_COUNT' => $i)
|
'S_ROW_COUNT' => $i)
|
||||||
);
|
);
|
||||||
|
@ -2054,6 +2061,13 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOTE: Delete topic shadows when made global? If so, we probably need an index on topic_moved_id (Ashe)
|
||||||
|
/* if ($make_global)
|
||||||
|
{
|
||||||
|
$db->sql_query('DELETE FROM ' . TOPICS_TABLE . '
|
||||||
|
WHERE topic_moved_id = ' . $data['topic_id']);
|
||||||
|
}*/
|
||||||
|
|
||||||
// Fulltext parse
|
// Fulltext parse
|
||||||
if ($data['message_md5'] != $data['post_checksum'] && $data['enable_indexing'])
|
if ($data['message_md5'] != $data['post_checksum'] && $data['enable_indexing'])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue