aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2009-06-26 20:18:05 +0000
committerHenry Sudhof <kellanved@phpbb.com>2009-06-26 20:18:05 +0000
commitd61574a61e4b46f8c7ad0e75f0e2261ab8405670 (patch)
treecdf914b384b9aae7618f5f31aab6601176676e5a
parent31968a5070a60d22aae1ed7bf503c92259b562e0 (diff)
downloadforums-d61574a61e4b46f8c7ad0e75f0e2261ab8405670.tar
forums-d61574a61e4b46f8c7ad0e75f0e2261ab8405670.tar.gz
forums-d61574a61e4b46f8c7ad0e75f0e2261ab8405670.tar.bz2
forums-d61574a61e4b46f8c7ad0e75f0e2261ab8405670.tar.xz
forums-d61574a61e4b46f8c7ad0e75f0e2261ab8405670.zip
Okay it should work again. Thanks Raimon. In the future, please test if your changes are really a good idea.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9694 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/ucp/ucp_register.php25
1 files changed, 11 insertions, 14 deletions
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 8192f5489b..ef6b076ebc 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -77,19 +77,6 @@ class ucp_register
}
}
- $vc_response = false;
- if ($config['enable_confirm'])
- {
- include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
- $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
- $captcha->init(CONFIRM_REG);
-
- // If confirm id is submitted we check the status of the captcha here
- if (request_var('confirm_code', ''))
- {
- $vc_response = $captcha->validate();
- }
- }
$cp = new custom_profile();
@@ -171,6 +158,15 @@ class ucp_register
$this->tpl_name = 'ucp_agreement';
return;
}
+
+
+ // The CAPTCHA kicks in here. We can't help that the information gets lost on language change.
+ if ($config['enable_confirm'])
+ {
+ include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
+ $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $captcha->init(CONFIRM_REG);
+ }
// Try to manually determine the timezone and adjust the dst if the server date/time complies with the default setting +/- 1
$timezone = date('Z') / 3600;
@@ -230,7 +226,8 @@ class ucp_register
if ($config['enable_confirm'])
{
- if (!$captcha->is_solved())
+ $vc_response = $captcha->validate();
+ if (!$captcha->is_solved() && $vc_response)
{
$error[] = $vc_response;
}