From: Henry S. <kel...@ph...> - 2009-09-15 09:12:04
|
Author: Kellanved Date: Tue Sep 15 10:11:17 2009 New Revision: 10144 Log: sanity check - avoid ugly error messages Modified: branches/phpBB-3_0_0/phpBB/includes/acp/acp_captcha.php Modified: branches/phpBB-3_0_0/phpBB/includes/acp/acp_captcha.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/acp/acp_captcha.php (original) --- branches/phpBB-3_0_0/phpBB/includes/acp/acp_captcha.php Tue Sep 15 10:11:17 2009 *************** *** 30,39 **** $user->add_lang('acp/board'); include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx); ! $selected = request_var('select_captcha', $config['captcha_plugin']); $configure = request_var('configure', false); // Oh, they are just here for the view if (isset($_GET['captcha_demo'])) { --- 30,42 ---- $user->add_lang('acp/board'); include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx); ! $captchas = phpbb_captcha_factory::get_captcha_types(); ! $selected = request_var('select_captcha', $config['captcha_plugin']); + $selected = (isset($captchas['available'][$selected]) || isset($captchas['unavailable'][$selected])) ? $selected : $config['captcha_plugin']; $configure = request_var('configure', false); + // Oh, they are just here for the view if (isset($_GET['captcha_demo'])) { *************** *** 49,56 **** } else { - $captchas = phpbb_captcha_factory::get_captcha_types(); - $config_vars = array( 'enable_confirm' => array('tpl' => 'REG_ENABLE', 'default' => false), 'enable_post_confirm' => array('tpl' => 'POST_ENABLE', 'default' => false), --- 52,57 ---- |