diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-09-28 15:04:59 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-09-28 15:04:59 +0000 |
commit | 26befa094147b542e48e36867eb41eaf424225f7 (patch) | |
tree | 5131952196ff19744498bbbdc962635cecc94c4f /phpBB/posting.php | |
parent | 67accdb07263030c29eebba9edf944fd350879d1 (diff) | |
download | forums-26befa094147b542e48e36867eb41eaf424225f7.tar forums-26befa094147b542e48e36867eb41eaf424225f7.tar.gz forums-26befa094147b542e48e36867eb41eaf424225f7.tar.bz2 forums-26befa094147b542e48e36867eb41eaf424225f7.tar.xz forums-26befa094147b542e48e36867eb41eaf424225f7.zip |
- added confirmation to removing bbcodes
- added optional MX and DNSBL checks
- added backtrace (triggering sql error) on error within sql_in_set as well as making sure it is handling an array
- let users having f_list access to a forum actually see the forum without a topic list and not displaying an error message - this allows for giving people access to subforums but not the parent forum without the need to add the (sub-)forum to the index.
- some additional bugfixes
git-svn-id: file:///svn/phpbb/trunk@6414 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r-- | phpBB/posting.php | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index c93324807d..e2cdbe47d1 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -640,7 +640,19 @@ if ($submit || $preview || $refresh) // Parse message if ($update_message) { + if (sizeof($message_parser->warn_msg)) + { + $error[] = implode('<br />', $message_parser->warn_msg); + $message_parser->warn_msg = array(); + } + $message_parser->parse($post_data['enable_bbcode'], ($config['allow_post_links']) ? $post_data['enable_urls'] : false, $post_data['enable_smilies'], $img_status, $flash_status, $quote_status, $config['allow_post_links']); + + // On a refresh we do not care about message parsing errors + if (sizeof($message_parser->warn_msg) && $refresh) + { + $message_parser->warn_msg = array(); + } } else { @@ -708,7 +720,7 @@ if ($submit || $preview || $refresh) } // Parse subject - if (!$post_data['post_subject'] && ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_id))) + if (!$refresh && !$post_data['post_subject'] && ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_id))) { $error[] = $user->lang['EMPTY_SUBJECT']; } @@ -773,11 +785,20 @@ if ($submit || $preview || $refresh) } } - if (sizeof($message_parser->warn_msg) && !$refresh) + if (sizeof($message_parser->warn_msg)) { $error[] = implode('<br />', $message_parser->warn_msg); } + // DNSBL check + if ($config['check_dnsbl'] && !$refresh) + { + if (($dnsbl = $user->check_dnsbl()) !== false) + { + $error[] = sprintf($user->lang['IP_BLACKLISTED'], $user->ip, $dnsbl[1]); + } + } + // Store message, sync counters if (!sizeof($error) && $submit) { |