1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-25 04:23:38 +01:00

[ticket/11157] get_captcha_types is an instance method.

It is specific to a particular captcha factory implementation,
instantiate a captcha factory to invoke it.

PHPBB3-11157
This commit is contained in:
Oleg Pudeyev 2012-10-29 14:47:39 -04:00
parent dc8052b5c0
commit 60d9538b14

View File

@ -29,7 +29,8 @@ class acp_captcha
$user->add_lang('acp/board'); $user->add_lang('acp/board');
include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx); include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
$captchas = phpbb_captcha_factory::get_captcha_types(); $factory = new phpbb_captcha_factory();
$captchas = $factory->get_captcha_types();
$selected = request_var('select_captcha', $config['captcha_plugin']); $selected = request_var('select_captcha', $config['captcha_plugin']);
$selected = (isset($captchas['available'][$selected]) || isset($captchas['unavailable'][$selected])) ? $selected : $config['captcha_plugin']; $selected = (isset($captchas['available'][$selected]) || isset($captchas['unavailable'][$selected])) ? $selected : $config['captcha_plugin'];