aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2009-07-27 11:39:28 +0000
committerHenry Sudhof <kellanved@phpbb.com>2009-07-27 11:39:28 +0000
commita0acfb6a3fce9a547d19c28ac99654275152ac98 (patch)
tree59d71ce527bf17e17be53fa47c728090cc647453 /phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
parent4066849b726b279923d0518c4754f21b464186a4 (diff)
downloadforums-a0acfb6a3fce9a547d19c28ac99654275152ac98.tar
forums-a0acfb6a3fce9a547d19c28ac99654275152ac98.tar.gz
forums-a0acfb6a3fce9a547d19c28ac99654275152ac98.tar.bz2
forums-a0acfb6a3fce9a547d19c28ac99654275152ac98.tar.xz
forums-a0acfb6a3fce9a547d19c28ac99654275152ac98.zip
Minor captcha API change - disable display of plugin by returning false in get_template.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9869 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php')
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php21
1 files changed, 14 insertions, 7 deletions
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
index 0a0a9f9211..1b34f26bfa 100644
--- a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
@@ -171,14 +171,21 @@ class phpbb_captcha_qa
{
global $template;
- $template->assign_vars(array(
- 'QA_CONFIRM_QUESTION' => $this->question_text,
- 'QA_CONFIRM_ID' => $this->confirm_id,
- 'S_CONFIRM_CODE' => true,
- 'S_TYPE' => $this->type,
- ));
+ if ($this->is_solved())
+ {
+ return false;
+ }
+ else
+ {
+ $template->assign_vars(array(
+ 'QA_CONFIRM_QUESTION' => $this->question_text,
+ 'QA_CONFIRM_ID' => $this->confirm_id,
+ 'S_CONFIRM_CODE' => true,
+ 'S_TYPE' => $this->type,
+ ));
- return 'captcha_qa.html';
+ return 'captcha_qa.html';
+ }
}
/**