diff options
Diffstat (limited to 'phpBB/includes/acp/acp_captcha.php')
-rw-r--r-- | phpBB/includes/acp/acp_captcha.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php index fa8d8fb6a9..1f6fbc2cae 100644 --- a/phpBB/includes/acp/acp_captcha.php +++ b/phpBB/includes/acp/acp_captcha.php @@ -25,17 +25,18 @@ class acp_captcha function main($id, $mode) { - global $db, $user, $auth, $template; + global $db, $user, $auth, $template, $phpbb_log, $request; global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_container; $user->add_lang('acp/board'); + /* @var $factory \phpbb\captcha\factory */ $factory = $phpbb_container->get('captcha.factory'); $captchas = $factory->get_captcha_types(); - $selected = request_var('select_captcha', $config['captcha_plugin']); + $selected = $request->variable('select_captcha', $config['captcha_plugin']); $selected = (isset($captchas['available'][$selected]) || isset($captchas['unavailable'][$selected])) ? $selected : $config['captcha_plugin']; - $configure = request_var('configure', false); + $configure = $request->variable('configure', false); // Oh, they are just here for the view if (isset($_GET['captcha_demo'])) @@ -64,13 +65,13 @@ class acp_captcha $form_key = 'acp_captcha'; add_form_key($form_key); - $submit = request_var('main_submit', false); + $submit = $request->variable('main_submit', false); if ($submit && check_form_key($form_key)) { foreach ($config_vars as $config_var => $options) { - set_config($config_var, request_var($config_var, $options['default'])); + $config->set($config_var, $request->variable($config_var, $options['default'])); } if ($selected !== $config['captcha_plugin']) @@ -81,11 +82,11 @@ class acp_captcha $old_captcha = $factory->get_instance($config['captcha_plugin']); $old_captcha->uninstall(); - set_config('captcha_plugin', $selected); + $config->set('captcha_plugin', $selected); $new_captcha = $factory->get_instance($config['captcha_plugin']); $new_captcha->install(); - add_log('admin', 'LOG_CONFIG_VISUAL'); + $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_CONFIG_VISUAL'); } else { @@ -117,7 +118,7 @@ class acp_captcha foreach ($config_vars as $config_var => $options) { - $template->assign_var($options['tpl'], (isset($_POST[$config_var])) ? request_var($config_var, $options['default']) : $config[$config_var]) ; + $template->assign_var($options['tpl'], (isset($_POST[$config_var])) ? $request->variable($config_var, $options['default']) : $config[$config_var]) ; } $template->assign_vars(array( |