mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Okay, okay, I see the issue. I'll revisit this tomorrow.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9695 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
d61574a61e
commit
076067f856
2 changed files with 5 additions and 10 deletions
|
@ -38,13 +38,12 @@ class phpbb_default_captcha
|
|||
global $config, $db, $user;
|
||||
|
||||
// read input
|
||||
$this->confirm_id = request_var('confirm_id', '');
|
||||
$this->confirm_code = request_var('confirm_code', '');
|
||||
$refresh = request_var('refresh_vc', false) && $config['confirm_refresh'];
|
||||
|
||||
$this->type = (int) $type;
|
||||
|
||||
if (!strlen($this->confirm_id) || !$this->load_code())
|
||||
if (!$this->load_code())
|
||||
{
|
||||
// we have no confirm ID, better get ready to display something
|
||||
$this->generate_code();
|
||||
|
@ -205,6 +204,7 @@ class phpbb_default_captcha
|
|||
{
|
||||
// okay, incorrect answer. Let's ask a new question.
|
||||
$this->new_attempt();
|
||||
$this->solved = false;
|
||||
return $error;
|
||||
}
|
||||
else
|
||||
|
@ -277,7 +277,6 @@ class phpbb_default_captcha
|
|||
'seed' => (int) $this->seed)) . '
|
||||
, attempts = attempts + 1
|
||||
WHERE
|
||||
confirm_id = \'' . $db->sql_escape($this->confirm_id) . '\' AND
|
||||
session_id = \'' . $db->sql_escape($user->session_id) . '\'';
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
@ -289,10 +288,9 @@ class phpbb_default_captcha
|
|||
{
|
||||
global $db, $user;
|
||||
|
||||
$sql = 'SELECT code, seed, attempts
|
||||
$sql = 'SELECT code, confirm_id, seed, attempts
|
||||
FROM ' . CONFIRM_TABLE . "
|
||||
WHERE confirm_id = '" . $db->sql_escape($this->confirm_id) . "'
|
||||
AND session_id = '" . $db->sql_escape($user->session_id) . "'
|
||||
WHERE session_id = '" . $db->sql_escape($user->session_id) . "'
|
||||
AND confirm_type = " . $this->type;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
|
@ -300,6 +298,7 @@ class phpbb_default_captcha
|
|||
|
||||
if ($row)
|
||||
{
|
||||
$this->confirm_id = $row['confirm_id'];
|
||||
$this->code = $row['code'];
|
||||
$this->seed = $row['seed'];
|
||||
$this->attempts = $row['attempts'];
|
||||
|
|
|
@ -103,10 +103,6 @@ class ucp_register
|
|||
'tz' => request_var('tz', (float) $config['board_timezone']),
|
||||
));
|
||||
|
||||
if ($config['enable_confirm'])
|
||||
{
|
||||
$s_hidden_fields = array_merge($s_hidden_fields, $captcha->get_hidden_fields());
|
||||
}
|
||||
}
|
||||
|
||||
// Checking amount of available languages
|
||||
|
|
Loading…
Add table
Reference in a new issue