mirror of
https://github.com/phpbb/phpbb.git
synced 2025-10-05 20:21:53 +02:00
[ticket/17547] Use confirm_type enum in captcha init()
PHPBB-17547
This commit is contained in:
@@ -194,7 +194,7 @@ class acp_captcha
|
|||||||
global $phpbb_container;
|
global $phpbb_container;
|
||||||
|
|
||||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($selected);
|
$captcha = $phpbb_container->get('captcha.factory')->get_instance($selected);
|
||||||
$captcha->init(CONFIRM_REG);
|
$captcha->init(\phpbb\captcha\plugins\confirm_type::REGISTRATION);
|
||||||
$captcha->execute_demo();
|
$captcha->execute_demo();
|
||||||
|
|
||||||
garbage_collection();
|
garbage_collection();
|
||||||
|
@@ -2408,7 +2408,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
|||||||
case LOGIN_ERROR_ATTEMPTS:
|
case LOGIN_ERROR_ATTEMPTS:
|
||||||
|
|
||||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
||||||
$captcha->init(CONFIRM_LOGIN);
|
$captcha->init(\phpbb\captcha\plugins\confirm_type::LOGIN);
|
||||||
// $captcha->reset();
|
// $captcha->reset();
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
|
@@ -216,7 +216,7 @@ class ucp_login_link
|
|||||||
case LOGIN_ERROR_ATTEMPTS:
|
case LOGIN_ERROR_ATTEMPTS:
|
||||||
|
|
||||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
||||||
$captcha->init(CONFIRM_LOGIN);
|
$captcha->init(\phpbb\captcha\plugins\confirm_type::LOGIN);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'CAPTCHA_TEMPLATE' => $captcha->get_template(),
|
'CAPTCHA_TEMPLATE' => $captcha->get_template(),
|
||||||
|
Reference in New Issue
Block a user