aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/captcha/plugins
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2010-01-26 15:34:21 +0000
committerHenry Sudhof <kellanved@phpbb.com>2010-01-26 15:34:21 +0000
commit81e62b4da808767fb7eef7fcb625383cbea0d9a4 (patch)
tree046c1aa4203d8944e47bc5b10d13054c0cdcac31 /phpBB/includes/captcha/plugins
parent8fa06090c442ffce06989bd6ff1877aa81f7a850 (diff)
downloadforums-81e62b4da808767fb7eef7fcb625383cbea0d9a4.tar
forums-81e62b4da808767fb7eef7fcb625383cbea0d9a4.tar.gz
forums-81e62b4da808767fb7eef7fcb625383cbea0d9a4.tar.bz2
forums-81e62b4da808767fb7eef7fcb625383cbea0d9a4.tar.xz
forums-81e62b4da808767fb7eef7fcb625383cbea0d9a4.zip
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
Diffstat (limited to 'phpBB/includes/captcha/plugins')
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php18
1 files changed, 3 insertions, 15 deletions
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
index 065de23e72..ef4d8e9fac 100644
--- a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
@@ -88,14 +88,8 @@ class phpbb_captcha_qa
$db->sql_freeresult($result);
}
- // Possible snag: the user didn't send a confirm_id. See, if we have something on file.
- if (!strlen($this->confirm_id))
- {
- $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())
+ // okay, if there is a confirm_id, we try to load that confirm's state. If not, we try to find one
+ if (!$this->load_answer() && (!$this->load_confirm_id() || !$this->load_answer()))
{
// we have no valid confirm ID, better get ready to ask something
$this->select_question();
@@ -486,11 +480,6 @@ class phpbb_captcha_qa
function load_confirm_id()
{
global $db, $user;
-
- if (!sizeof($this->question_ids))
- {
- return false;
- }
$sql = 'SELECT confirm_id
FROM ' . CAPTCHA_QA_CONFIRM_TABLE . "
@@ -507,7 +496,6 @@ class phpbb_captcha_qa
$this->confirm_id = $row['confirm_id'];
return true;
}
-
return false;
}
@@ -518,7 +506,7 @@ class phpbb_captcha_qa
{
global $db, $user;
- if (!sizeof($this->question_ids))
+ if (!strlen($this->confirm_id) || !sizeof($this->question_ids))
{
return false;
}