aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/common.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-08-21 16:49:08 +0200
committerJoas Schilling <nickvergessen@gmx.de>2012-08-21 16:49:08 +0200
commitd289bc13acc0ab0329cac25742ae22560a80c607 (patch)
treebfd6d91205e19132d49e254618ad67ce501c8a30 /phpBB/common.php
parentd828ef93f29eda5fe31a6f8291dd1e5b3cdfd97c (diff)
downloadforums-d289bc13acc0ab0329cac25742ae22560a80c607.tar
forums-d289bc13acc0ab0329cac25742ae22560a80c607.tar.gz
forums-d289bc13acc0ab0329cac25742ae22560a80c607.tar.bz2
forums-d289bc13acc0ab0329cac25742ae22560a80c607.tar.xz
forums-d289bc13acc0ab0329cac25742ae22560a80c607.zip
[ticket/10714] Remove dependency injection and use global instead
This avoids loading functions_admin.php globally and was suggested by naderman PHPBB3-10714
Diffstat (limited to 'phpBB/common.php')
-rw-r--r--phpBB/common.php11
1 files changed, 2 insertions, 9 deletions
diff --git a/phpBB/common.php b/phpBB/common.php
index 799c1162b1..2d2b31df83 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -76,7 +76,6 @@ 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);
@@ -119,6 +118,8 @@ $config = new phpbb_config_db($db, $cache->get_driver(), CONFIG_TABLE);
set_config(null, null, null, $config);
set_config_count(null, null, null, $config);
+$phpbb_log = new phpbb_log(LOG_TABLE);
+
// load extensions
$phpbb_extension_manager = new phpbb_extension_manager($db, EXT_TABLE, $phpbb_root_path, ".$phpEx", $cache->get_driver());
@@ -140,14 +141,6 @@ foreach ($cache->obtain_hooks() as $hook)
@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
-// 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'])
{
$cron = new phpbb_cron_manager(new phpbb_cron_task_provider($phpbb_extension_manager), $cache->get_driver());