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:
Henry Sudhof 2009-06-26 20:58:36 +00:00
parent d61574a61e
commit 076067f856
2 changed files with 5 additions and 10 deletions

View file

@ -38,13 +38,12 @@ class phpbb_default_captcha
global $config, $db, $user; global $config, $db, $user;
// read input // read input
$this->confirm_id = request_var('confirm_id', '');
$this->confirm_code = request_var('confirm_code', ''); $this->confirm_code = request_var('confirm_code', '');
$refresh = request_var('refresh_vc', false) && $config['confirm_refresh']; $refresh = request_var('refresh_vc', false) && $config['confirm_refresh'];
$this->type = (int) $type; $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 // we have no confirm ID, better get ready to display something
$this->generate_code(); $this->generate_code();
@ -205,6 +204,7 @@ class phpbb_default_captcha
{ {
// okay, incorrect answer. Let's ask a new question. // okay, incorrect answer. Let's ask a new question.
$this->new_attempt(); $this->new_attempt();
$this->solved = false;
return $error; return $error;
} }
else else
@ -277,7 +277,6 @@ class phpbb_default_captcha
'seed' => (int) $this->seed)) . ' 'seed' => (int) $this->seed)) . '
, attempts = attempts + 1 , attempts = attempts + 1
WHERE WHERE
confirm_id = \'' . $db->sql_escape($this->confirm_id) . '\' AND
session_id = \'' . $db->sql_escape($user->session_id) . '\''; session_id = \'' . $db->sql_escape($user->session_id) . '\'';
$db->sql_query($sql); $db->sql_query($sql);
} }
@ -289,10 +288,9 @@ class phpbb_default_captcha
{ {
global $db, $user; global $db, $user;
$sql = 'SELECT code, seed, attempts $sql = 'SELECT code, confirm_id, seed, attempts
FROM ' . CONFIRM_TABLE . " FROM ' . CONFIRM_TABLE . "
WHERE confirm_id = '" . $db->sql_escape($this->confirm_id) . "' WHERE session_id = '" . $db->sql_escape($user->session_id) . "'
AND session_id = '" . $db->sql_escape($user->session_id) . "'
AND confirm_type = " . $this->type; AND confirm_type = " . $this->type;
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result); $row = $db->sql_fetchrow($result);
@ -300,6 +298,7 @@ class phpbb_default_captcha
if ($row) if ($row)
{ {
$this->confirm_id = $row['confirm_id'];
$this->code = $row['code']; $this->code = $row['code'];
$this->seed = $row['seed']; $this->seed = $row['seed'];
$this->attempts = $row['attempts']; $this->attempts = $row['attempts'];

View file

@ -103,10 +103,6 @@ class ucp_register
'tz' => request_var('tz', (float) $config['board_timezone']), '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 // Checking amount of available languages