diff options
| author | Tristan Darricau <github@nicofuma.fr> | 2014-08-08 18:02:03 +0200 |
|---|---|---|
| committer | Tristan Darricau <github@nicofuma.fr> | 2014-08-11 01:15:49 +0200 |
| commit | 160ff7b912243dc14d871b820213ddcd20dd06f4 (patch) | |
| tree | d6d2f0e7fa38cc5944c7a0fa438c1deea2adc1c6 /phpBB/includes/ucp | |
| parent | e0d377bca70cff7846ba920a03b717aac1d208a4 (diff) | |
| download | forums-160ff7b912243dc14d871b820213ddcd20dd06f4.tar forums-160ff7b912243dc14d871b820213ddcd20dd06f4.tar.gz forums-160ff7b912243dc14d871b820213ddcd20dd06f4.tar.bz2 forums-160ff7b912243dc14d871b820213ddcd20dd06f4.tar.xz forums-160ff7b912243dc14d871b820213ddcd20dd06f4.zip | |
[ticket/11854] Move captcha stuff to phpbb/ and use DI for plugins
PHPBB3-11854
Diffstat (limited to 'phpBB/includes/ucp')
| -rw-r--r-- | phpBB/includes/ucp/ucp_confirm.php | 5 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_login_link.php | 4 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_register.php | 3 |
3 files changed, 5 insertions, 7 deletions
diff --git a/phpBB/includes/ucp/ucp_confirm.php b/phpBB/includes/ucp/ucp_confirm.php index bcba32cdf6..8ade142e2b 100644 --- a/phpBB/includes/ucp/ucp_confirm.php +++ b/phpBB/includes/ucp/ucp_confirm.php @@ -36,10 +36,9 @@ class ucp_confirm function main($id, $mode) { - global $db, $user, $phpbb_root_path, $config, $phpEx; + global $db, $user, $phpbb_root_path, $config, $phpEx, $phpbb_container; - include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx); - $captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']); + $captcha = $phpbb_container->get('captchas.factory')->get_instance($config['captcha_plugin']); $captcha->init(request_var('type', 0)); $captcha->execute(); diff --git a/phpBB/includes/ucp/ucp_login_link.php b/phpBB/includes/ucp/ucp_login_link.php index a8762313fd..7c768992f7 100644 --- a/phpBB/includes/ucp/ucp_login_link.php +++ b/phpBB/includes/ucp/ucp_login_link.php @@ -181,7 +181,7 @@ class ucp_login_link */ protected function process_login_result($result) { - global $config, $request, $template, $user; + global $config, $request, $template, $user, $phpbb_container; $login_error = null; @@ -197,7 +197,7 @@ class ucp_login_link { case LOGIN_ERROR_ATTEMPTS: - $captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']); + $captcha = $phpbb_container->get('captchas.factory')->get_instance($config['captcha_plugin']); $captcha->init(CONFIRM_LOGIN); $template->assign_vars(array( diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 97934fc32d..dbe2233553 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -182,8 +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']) { - include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx); - $captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']); + $captcha = $phpbb_container->get('captchas.factory')->get_instance($config['captcha_plugin']); $captcha->init(CONFIRM_REG); } |
