[ticket/10714] Create a phpbb_log object and inject it into add_log

PHPBB3-10714
This commit is contained in:
Joas Schilling 2012-03-18 00:07:09 +01:00
parent 34ce2561a0
commit 87eec7cfb6

View file

@ -139,6 +139,10 @@ foreach ($cache->obtain_hooks() as $hook)
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx); @include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
} }
// make sure add_log uses this log instance
$phpbb_log = new phpbb_log(LOG_TABLE);
add_log($phpbb_log); // "dependency injection" for a function
if (!$config['use_system_cron']) if (!$config['use_system_cron'])
{ {
$cron = new phpbb_cron_manager(new phpbb_cron_task_provider($phpbb_extension_manager), $cache->get_driver()); $cron = new phpbb_cron_manager(new phpbb_cron_task_provider($phpbb_extension_manager), $cache->get_driver());