mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/10714] Inject the global $phpbb_log into view_log()
PHPBB3-10714
This commit is contained in:
parent
97290647fa
commit
325827c40f
1 changed files with 5 additions and 0 deletions
|
@ -76,6 +76,7 @@ if (!empty($load_extensions) && function_exists('dl'))
|
||||||
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
||||||
|
|
||||||
require($phpbb_root_path . 'includes/functions.' . $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/functions_content.' . $phpEx);
|
||||||
|
|
||||||
require($phpbb_root_path . 'includes/constants.' . $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
|
// make sure add_log uses this log instance
|
||||||
$phpbb_log = new phpbb_log(LOG_TABLE);
|
$phpbb_log = new phpbb_log(LOG_TABLE);
|
||||||
add_log($phpbb_log); // "dependency injection" for a function
|
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'])
|
if (!$config['use_system_cron'])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue