mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-05 14:04:57 +02:00
[ticket/11854] Rename captchas.factory service to captcha.factory
PHPBB3-11854
This commit is contained in:
parent
d73d606f11
commit
b91abf1a0b
@ -1,5 +1,5 @@
|
||||
services:
|
||||
captchas.factory:
|
||||
captcha.factory:
|
||||
class: phpbb\captcha\factory
|
||||
arguments:
|
||||
- @service_container
|
||||
|
@ -30,7 +30,7 @@ class acp_captcha
|
||||
|
||||
$user->add_lang('acp/board');
|
||||
|
||||
$factory = $phpbb_container->get('captchas.factory');
|
||||
$factory = $phpbb_container->get('captcha.factory');
|
||||
$captchas = $factory->get_captcha_types();
|
||||
|
||||
$selected = request_var('select_captcha', $config['captcha_plugin']);
|
||||
@ -138,7 +138,7 @@ class acp_captcha
|
||||
{
|
||||
global $db, $user, $config, $phpbb_container;
|
||||
|
||||
$captcha = $phpbb_container->get('captchas.factory')->get_instance($selected);
|
||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($selected);
|
||||
$captcha->init(CONFIRM_REG);
|
||||
$captcha->execute_demo();
|
||||
|
||||
|
@ -2839,7 +2839,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
{
|
||||
case LOGIN_ERROR_ATTEMPTS:
|
||||
|
||||
$captcha = $phpbb_container->get('captchas.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_LOGIN);
|
||||
// $captcha->reset();
|
||||
|
||||
|
@ -38,7 +38,7 @@ class ucp_confirm
|
||||
{
|
||||
global $db, $user, $phpbb_root_path, $config, $phpEx, $phpbb_container;
|
||||
|
||||
$captcha = $phpbb_container->get('captchas.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha->init(request_var('type', 0));
|
||||
$captcha->execute();
|
||||
|
||||
|
@ -197,7 +197,7 @@ class ucp_login_link
|
||||
{
|
||||
case LOGIN_ERROR_ATTEMPTS:
|
||||
|
||||
$captcha = $phpbb_container->get('captchas.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_LOGIN);
|
||||
|
||||
$template->assign_vars(array(
|
||||
|
@ -182,7 +182,7 @@ class ucp_register
|
||||
// The CAPTCHA kicks in here. We can't help that the information gets lost on language change.
|
||||
if ($config['enable_confirm'])
|
||||
{
|
||||
$captcha = $phpbb_container->get('captchas.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_REG);
|
||||
}
|
||||
|
||||
|
@ -1022,7 +1022,7 @@ class session
|
||||
}
|
||||
|
||||
// only called from CRON; should be a safe workaround until the infrastructure gets going
|
||||
$captcha_factory = $phpbb_container->get('captchas.factory');
|
||||
$captcha_factory = $phpbb_container->get('captcha.factory');
|
||||
$captcha_factory->garbage_collect($config['captcha_plugin']);
|
||||
|
||||
$sql = 'DELETE FROM ' . LOGIN_ATTEMPT_TABLE . '
|
||||
|
@ -241,7 +241,7 @@ $user->setup(array('posting', 'mcp', 'viewtopic'), $post_data['forum_style']);
|
||||
|
||||
if ($config['enable_post_confirm'] && !$user->data['is_registered'])
|
||||
{
|
||||
$captcha = $phpbb_container->get('captchas.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_POST);
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ else
|
||||
|
||||
if ($config['enable_post_confirm'] && !$user->data['is_registered'])
|
||||
{
|
||||
$captcha = $phpbb_container->get('captchas.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_REPORT);
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ class phpbb_session_garbage_collection_test extends phpbb_session_test_case
|
||||
$plugins = new \phpbb\di\service_collection($phpbb_container);
|
||||
$plugins->add('core.captcha.plugins.nogd');
|
||||
$phpbb_container->set(
|
||||
'captchas.factory',
|
||||
'captcha.factory',
|
||||
new \phpbb\captcha\factory($phpbb_container, $plugins)
|
||||
);
|
||||
$phpbb_container->set(
|
||||
|
Loading…
x
Reference in New Issue
Block a user