aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/captcha/plugins/phpbb_recaptcha_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_recaptcha_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_recaptcha_plugin.php')
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php27
1 files changed, 17 insertions, 10 deletions
diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
index f148b12656..9a2cc11ebd 100644
--- a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
@@ -128,16 +128,23 @@ class phpbb_recaptcha extends phpbb_default_captcha
{
global $config, $user, $template;
- $template->assign_vars(array(
- 'RECAPTCHA_SERVER' => $this->recaptcha_server,
- 'RECAPTCHA_PUBKEY' => isset($config['recaptcha_pubkey']) ? $config['recaptcha_pubkey'] : '',
- 'RECAPTCHA_ERRORGET' => '',
- 'S_RECAPTCHA_AVAILABLE' => $this->is_available(),
- 'S_CONFIRM_CODE' => true,
- 'S_TYPE' => $this->type,
- ));
-
- return 'captcha_recaptcha.html';
+ if ($this->is_solved())
+ {
+ return false;
+ }
+ else
+ {
+ $template->assign_vars(array(
+ 'RECAPTCHA_SERVER' => $this->recaptcha_server,
+ 'RECAPTCHA_PUBKEY' => isset($config['recaptcha_pubkey']) ? $config['recaptcha_pubkey'] : '',
+ 'RECAPTCHA_ERRORGET' => '',
+ 'S_RECAPTCHA_AVAILABLE' => $this->is_available(),
+ 'S_CONFIRM_CODE' => true,
+ 'S_TYPE' => $this->type,
+ ));
+
+ return 'captcha_recaptcha.html';
+ }
}
function get_demo_template($id)