diff options
| author | Henry Sudhof <kellanved@phpbb.com> | 2009-07-27 11:39:28 +0000 |
|---|---|---|
| committer | Henry Sudhof <kellanved@phpbb.com> | 2009-07-27 11:39:28 +0000 |
| commit | a0acfb6a3fce9a547d19c28ac99654275152ac98 (patch) | |
| tree | 59d71ce527bf17e17be53fa47c728090cc647453 /phpBB/includes/captcha/plugins/captcha_abstract.php | |
| parent | 4066849b726b279923d0518c4754f21b464186a4 (diff) | |
| download | forums-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/captcha_abstract.php')
| -rw-r--r-- | phpBB/includes/captcha/plugins/captcha_abstract.php | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/phpBB/includes/captcha/plugins/captcha_abstract.php b/phpBB/includes/captcha/plugins/captcha_abstract.php index fb64063a90..d24e554188 100644 --- a/phpBB/includes/captcha/plugins/captcha_abstract.php +++ b/phpBB/includes/captcha/plugins/captcha_abstract.php @@ -87,21 +87,28 @@ class phpbb_default_captcha { global $config, $user, $template, $phpEx, $phpbb_root_path; - $link = append_sid($phpbb_root_path . 'ucp.' . $phpEx . '?mode=confirm&confirm_id=' . $this->confirm_id . '&type=' . $this->type); - $explain = ($this->type != CONFIRM_POST) ? sprintf($user->lang['CONFIRM_EXPLAIN'], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>') : $user->lang['POST_CONFIRM_EXPLAIN']; - - $template->assign_vars(array( - 'CONFIRM_IMAGE_LINK' => $link, - 'CONFIRM_IMAGE' => '<img src="'. $link . '" />', - 'CONFIRM_IMG' => '<img src="'. $link . '" />', - 'CONFIRM_ID' => $this->confirm_id, - 'S_CONFIRM_CODE' => true, - 'S_TYPE' => $this->type, - 'S_CONFIRM_REFRESH' => ($config['enable_confirm'] && $config['confirm_refresh'] && $this->type == CONFIRM_REG) ? true : false, - 'L_CONFIRM_EXPLAIN' => $explain, - )); - - return 'captcha_default.html'; + if ($this->is_solved()) + { + return false; + } + else + { + $link = append_sid($phpbb_root_path . 'ucp.' . $phpEx . '?mode=confirm&confirm_id=' . $this->confirm_id . '&type=' . $this->type); + $explain = ($this->type != CONFIRM_POST) ? sprintf($user->lang['CONFIRM_EXPLAIN'], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>') : $user->lang['POST_CONFIRM_EXPLAIN']; + + $template->assign_vars(array( + 'CONFIRM_IMAGE_LINK' => $link, + 'CONFIRM_IMAGE' => '<img src="'. $link . '" />', + 'CONFIRM_IMG' => '<img src="'. $link . '" />', + 'CONFIRM_ID' => $this->confirm_id, + 'S_CONFIRM_CODE' => true, + 'S_TYPE' => $this->type, + 'S_CONFIRM_REFRESH' => ($config['enable_confirm'] && $config['confirm_refresh'] && $this->type == CONFIRM_REG) ? true : false, + 'L_CONFIRM_EXPLAIN' => $explain, + )); + + return 'captcha_default.html'; + } } function get_demo_template($id) |
