mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 12:03:21 +01:00
[ticket/10714] Inject the global $phpbb_log into view_log()
PHPBB3-10714
This commit is contained in:
parent
97290647fa
commit
325827c40f
@ -76,6 +76,7 @@ if (!empty($load_extensions) && function_exists('dl'))
|
||||
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
||||
|
||||
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
|
||||
|
||||
require($phpbb_root_path . 'includes/constants.' . $phpEx);
|
||||
@ -142,6 +143,10 @@ foreach ($cache->obtain_hooks() as $hook)
|
||||
// make sure add_log uses this log instance
|
||||
$phpbb_log = new phpbb_log(LOG_TABLE);
|
||||
add_log($phpbb_log); // "dependency injection" for a function
|
||||
// Parameter 2 and 3 are passed by reference, so we need to create a variable for it.
|
||||
$tmp_var = '';
|
||||
view_log($phpbb_log, $tmp_var, $tmp_var); // "dependency injection" for a function
|
||||
unset($tmp_var);
|
||||
|
||||
if (!$config['use_system_cron'])
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user