1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-18 22:58:10 +01:00

Add some data for akismet et al

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9702 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Henry Sudhof 2009-06-29 12:52:45 +00:00
parent a8d678cc4c
commit e146efbd16
3 changed files with 10 additions and 5 deletions

View File

@ -178,7 +178,7 @@ class phpbb_default_captcha
return; return;
} }
function validate() function validate($data = false)
{ {
global $config, $db, $user; global $config, $db, $user;
@ -344,7 +344,7 @@ class phpbb_default_captcha
function is_solved() function is_solved()
{ {
if ($this->solved === 0) if (request_var('confirm_code', false) && $this->solved === 0)
{ {
$this->validate(); $this->validate();
} }

View File

@ -222,8 +222,8 @@ class ucp_register
if ($config['enable_confirm']) if ($config['enable_confirm'])
{ {
$vc_response = $captcha->validate(); $vc_response = $captcha->validate($data);
if (!$captcha->is_solved() && $vc_response) if ($vc_response)
{ {
$error[] = $vc_response; $error[] = $vc_response;
} }

View File

@ -772,7 +772,12 @@ if ($submit || $preview || $refresh)
if ($config['enable_post_confirm'] && !$user->data['is_registered'] && in_array($mode, array('quote', 'post', 'reply'))) if ($config['enable_post_confirm'] && !$user->data['is_registered'] && in_array($mode, array('quote', 'post', 'reply')))
{ {
$vc_response = $captcha->validate(); $captcha_data = array(
'message' => utf8_normalize_nfc(request_var('message', '', true)),
'subject' => utf8_normalize_nfc(request_var('subject', '', true)),
'username' => utf8_normalize_nfc(request_var('username', '', true)),
);
$vc_response = $captcha->validate($captcha_data);
if ($vc_response) if ($vc_response)
{ {
$error[] = $vc_response; $error[] = $vc_response;