1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 03:04:09 +02:00

[ticket/11854] Move captcha stuff to phpbb/ and use DI for plugins

PHPBB3-11854
This commit is contained in:
Tristan Darricau
2014-08-08 18:02:03 +02:00
parent e0d377bca7
commit 160ff7b912
24 changed files with 318 additions and 405 deletions

View File

@@ -962,7 +962,7 @@ class session
*/
function session_gc()
{
global $db, $config, $phpbb_root_path, $phpEx;
global $db, $config, $phpbb_root_path, $phpEx, $phpbb_container;
$batch_size = 10;
@@ -1022,11 +1022,7 @@ class session
}
// only called from CRON; should be a safe workaround until the infrastructure gets going
if (!class_exists('phpbb_captcha_factory', false))
{
include($phpbb_root_path . "includes/captcha/captcha_factory." . $phpEx);
}
$captcha_factory = new \phpbb_captcha_factory();
$captcha_factory = $phpbb_container->get('captchas.factory');
$captcha_factory->garbage_collect($config['captcha_plugin']);
$sql = 'DELETE FROM ' . LOGIN_ATTEMPT_TABLE . '