aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2009-12-08 22:45:39 +0000
committerChris Smith <toonarmy@phpbb.com>2009-12-08 22:45:39 +0000
commit5a2eb175bb28bd20fc3c874e655fc2b1715d7211 (patch)
tree846996a4ebe633b2eec4a0b6c6ca97861ed9a1a3
parent9d5ac32d8e1e4016a17635a368204c25f30a4bcc (diff)
downloadforums-5a2eb175bb28bd20fc3c874e655fc2b1715d7211.tar
forums-5a2eb175bb28bd20fc3c874e655fc2b1715d7211.tar.gz
forums-5a2eb175bb28bd20fc3c874e655fc2b1715d7211.tar.bz2
forums-5a2eb175bb28bd20fc3c874e655fc2b1715d7211.tar.xz
forums-5a2eb175bb28bd20fc3c874e655fc2b1715d7211.zip
One issue solved possily others, so not closing yet. #55245
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10306 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/posting.php14
2 files changed, 8 insertions, 7 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index b9d85ffd19..18e0f5455d 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -105,6 +105,7 @@
<li>[Fix] PHP 5.3 compatibility: Disable E_DEPRECATED on startup to keep set_magic_quotes_runtime(0) quiet. (Bug #54495)</li>
<li>[Fix] Correctly replace table prefix before inserting schema data into the database. (Bug #54815)</li>
<li>[Fix] Correctly take post time instead of topic time for the overall forum feed statistics row. (Bug #55005)</li>
+ <li>[Fix] Posting errors with CAPTCHAs using user::add_lang(). (Bug #55245)</li>
<li>[Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)</li>
<li>[Change] Use em dash instead of hyphen/minus as separator in ATOM Feeds item statistics. (Bug #53565)</li>
</ul>
diff --git a/phpBB/posting.php b/phpBB/posting.php
index f5d1346865..660ca8ef23 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -45,13 +45,6 @@ $mode = ($delete && !$preview && !$refresh && $submit) ? 'delete' : request_var
$error = $post_data = array();
$current_time = time();
-if ($config['enable_post_confirm'] && !$user->data['is_registered'])
-{
- include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
- $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
- $captcha->init(CONFIRM_POST);
-}
-
// Was cancel pressed? If so then redirect to the appropriate page
if ($cancel || ($current_time - $lastclick < 2 && $submit))
{
@@ -186,6 +179,13 @@ if ($mode == 'popup')
$user->setup(array('posting', 'mcp', 'viewtopic'), $post_data['forum_style']);
+if ($config['enable_post_confirm'] && !$user->data['is_registered'])
+{
+ include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
+ $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $captcha->init(CONFIRM_POST);
+}
+
// Use post_row values in favor of submitted ones...
$forum_id = (!empty($post_data['forum_id'])) ? (int) $post_data['forum_id'] : (int) $forum_id;
$topic_id = (!empty($post_data['topic_id'])) ? (int) $post_data['topic_id'] : (int) $topic_id;