mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
okay, now the confirm_id is no longer enough to get a new row into the qa table
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10459 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
8fa06090c4
commit
81e62b4da8
1 changed files with 3 additions and 15 deletions
|
@ -88,14 +88,8 @@ class phpbb_captcha_qa
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Possible snag: the user didn't send a confirm_id. See, if we have something on file.
|
// okay, if there is a confirm_id, we try to load that confirm's state. If not, we try to find one
|
||||||
if (!strlen($this->confirm_id))
|
if (!$this->load_answer() && (!$this->load_confirm_id() || !$this->load_answer()))
|
||||||
{
|
|
||||||
$this->load_confirm_id();
|
|
||||||
}
|
|
||||||
|
|
||||||
// okay, if there is a confirm_id, we try to load that confirm's state
|
|
||||||
if (!strlen($this->confirm_id) || !$this->load_answer())
|
|
||||||
{
|
{
|
||||||
// we have no valid confirm ID, better get ready to ask something
|
// we have no valid confirm ID, better get ready to ask something
|
||||||
$this->select_question();
|
$this->select_question();
|
||||||
|
@ -487,11 +481,6 @@ class phpbb_captcha_qa
|
||||||
{
|
{
|
||||||
global $db, $user;
|
global $db, $user;
|
||||||
|
|
||||||
if (!sizeof($this->question_ids))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = 'SELECT confirm_id
|
$sql = 'SELECT confirm_id
|
||||||
FROM ' . CAPTCHA_QA_CONFIRM_TABLE . "
|
FROM ' . CAPTCHA_QA_CONFIRM_TABLE . "
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -507,7 +496,6 @@ class phpbb_captcha_qa
|
||||||
$this->confirm_id = $row['confirm_id'];
|
$this->confirm_id = $row['confirm_id'];
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -518,7 +506,7 @@ class phpbb_captcha_qa
|
||||||
{
|
{
|
||||||
global $db, $user;
|
global $db, $user;
|
||||||
|
|
||||||
if (!sizeof($this->question_ids))
|
if (!strlen($this->confirm_id) || !sizeof($this->question_ids))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue