diff options
author | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:41 +0100 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:41 +0100 |
commit | 6ebc26e330d5e204eab0ac9061bb5817534047fe (patch) | |
tree | 417aa508a0b4282ec0ae1834ea02032e7e033d5f /phpBB/includes/captcha/plugins | |
parent | f0eb18fffd11a97383c8ccf2ae7d2838939f09e2 (diff) | |
parent | 8d12b40fc4fdf50517e9584d14a5edd311953e7c (diff) | |
download | forums-6ebc26e330d5e204eab0ac9061bb5817534047fe.tar forums-6ebc26e330d5e204eab0ac9061bb5817534047fe.tar.gz forums-6ebc26e330d5e204eab0ac9061bb5817534047fe.tar.bz2 forums-6ebc26e330d5e204eab0ac9061bb5817534047fe.tar.xz forums-6ebc26e330d5e204eab0ac9061bb5817534047fe.zip |
Merge commit 'release-3.0.6-RC3'
Diffstat (limited to 'phpBB/includes/captcha/plugins')
-rw-r--r-- | phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php index 411d1366fa..c17cfa7bbe 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php @@ -349,7 +349,12 @@ class phpbb_captcha_qa global $config, $db, $user; $error = ''; - + + if (!sizeof($this->question_ids)) + { + return false; + } + if (!$this->confirm_id) { $error = $user->lang['CONFIRM_QUESTION_WRONG']; @@ -388,6 +393,11 @@ class phpbb_captcha_qa { global $db, $user; + + if (!sizeof($this->question_ids)) + { + return false; + } $this->confirm_id = md5(unique_id($user->ip)); $this->question = (int) array_rand($this->question_ids); @@ -409,6 +419,11 @@ class phpbb_captcha_qa function reselect_question() { global $db, $user; + + if (!sizeof($this->question_ids)) + { + return false; + } $this->question = (int) array_rand($this->question_ids); $this->solved = 0; @@ -449,6 +464,11 @@ class phpbb_captcha_qa function load_answer() { global $db, $user; + + if (!sizeof($this->question_ids)) + { + return false; + } $sql = 'SELECT con.question_id, attempts, question_text, strict FROM ' . CAPTCHA_QA_CONFIRM_TABLE . ' con, ' . CAPTCHA_QUESTIONS_TABLE . " qes |