diff options
author | Henry Sudhof <kellanved@phpbb.com> | 2008-09-19 13:17:30 +0000 |
---|---|---|
committer | Henry Sudhof <kellanved@phpbb.com> | 2008-09-19 13:17:30 +0000 |
commit | 461be11e8d0f5d4bd879cf95bd1472dbe985e0b6 (patch) | |
tree | d170e1a09d717a49bf676ef1f2ed9edbfa1be0db /phpBB/includes/ucp/ucp_confirm.php | |
parent | 5349280538df70d63c5e6f91e7f4e6ecad01d23d (diff) | |
download | forums-461be11e8d0f5d4bd879cf95bd1472dbe985e0b6.tar forums-461be11e8d0f5d4bd879cf95bd1472dbe985e0b6.tar.gz forums-461be11e8d0f5d4bd879cf95bd1472dbe985e0b6.tar.bz2 forums-461be11e8d0f5d4bd879cf95bd1472dbe985e0b6.tar.xz forums-461be11e8d0f5d4bd879cf95bd1472dbe985e0b6.zip |
Okay, that is pretty raw, but better to have it in place than trying to play catch-up. Introducing an early stage of CAPTCHA modules.
git-svn-id: file:///svn/phpbb/trunk@8889 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp/ucp_confirm.php')
-rw-r--r-- | phpBB/includes/ucp/ucp_confirm.php | 43 |
1 files changed, 5 insertions, 38 deletions
diff --git a/phpBB/includes/ucp/ucp_confirm.php b/phpBB/includes/ucp/ucp_confirm.php index 94fb9a729f..26ffc3c5fb 100644 --- a/phpBB/includes/ucp/ucp_confirm.php +++ b/phpBB/includes/ucp/ucp_confirm.php @@ -3,7 +3,7 @@ * * @package VC * @version $Id$ -* @copyright (c) 2005 phpBB Group +* @copyright (c) 2005 2008 phpBB Group * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ @@ -36,43 +36,10 @@ class ucp_confirm function main($id, $mode) { global $db, $user, $config; - - // Do we have an id? No, then just exit - $confirm_id = request_var('id', ''); - $type = request_var('type', 0); - - if (!$confirm_id || !$type) - { - exit; - } - - // Try and grab code for this id and session - $sql = 'SELECT code, seed - FROM ' . CONFIRM_TABLE . " - WHERE session_id = '" . $db->sql_escape($user->session_id) . "' - AND confirm_id = '" . $db->sql_escape($confirm_id) . "' - AND confirm_type = $type"; - $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - // If we have a row then grab data else create a new id - if (!$row) - { - exit; - } - - if ($config['captcha_gd']) - { - include(PHPBB_ROOT_PATH . 'includes/captcha/captcha_gd.' . PHP_EXT); - } - else - { - include(PHPBB_ROOT_PATH . 'includes/captcha/captcha_non_gd.' . PHP_EXT); - } - - captcha::execute($row['code'], $row['seed']); - + include(PHPBB_ROOT_PATH . 'includes/captcha/captcha_factory.' . PHP_EXT); + $captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']); + $captcha->init(request_var('type', 0)); + $captcha->execute(); garbage_collection(); exit_handler(); } |