aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-11-27 23:44:59 +0000
committerLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-11-27 23:44:59 +0000
commiteb7cc50608b32d09c15eb321f8803268d9bff5bc (patch)
tree6fbb507baa859f1514377c16751a5aa4acf5cc1b /phpBB/posting.php
parent84ede6d436a9351ba0aee69f40235ecfe333d3c9 (diff)
downloadforums-eb7cc50608b32d09c15eb321f8803268d9bff5bc.tar
forums-eb7cc50608b32d09c15eb321f8803268d9bff5bc.tar.gz
forums-eb7cc50608b32d09c15eb321f8803268d9bff5bc.tar.bz2
forums-eb7cc50608b32d09c15eb321f8803268d9bff5bc.tar.xz
forums-eb7cc50608b32d09c15eb321f8803268d9bff5bc.zip
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
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php22
1 files changed, 18 insertions, 4 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 18fbf6a534..a8f0067784 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -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;
$img_status = ($auth->acl_get('f_img', $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
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)
{
// 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);
- 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
if ($user->data['user_id'] != ANONYMOUS)
@@ -592,6 +592,13 @@ if ($submit || $preview || $refresh)
}
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
FROM ' . POSTS_TABLE . "
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_MINI_POST' => "{$phpbb_root_path}viewtopic.$phpEx$SID&amp;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)
);
@@ -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
if ($data['message_md5'] != $data['post_checksum'] && $data['enable_indexing'])
{