From 78648514fa8b847cfb63cd4b5432d3fa73dd106f Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Fri, 27 Jun 2014 20:41:16 +0200 Subject: [PATCH] [ticket/12775] Update phpBB/bin/phpbbcli.php PHPBB3-12775 --- phpBB/bin/phpbbcli.php | 11 ++++++++--- phpBB/phpbb/config_php.php | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 8b8d8e43fd..e6b9e3ac8d 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -22,11 +22,9 @@ define('IN_PHPBB', true); $phpbb_root_path = __DIR__ . '/../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); require($phpbb_root_path . 'includes/startup.' . $phpEx); -require($phpbb_root_path . 'config.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx); require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); -require($phpbb_root_path . 'includes/functions_container.' . $phpEx); require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx); @@ -35,7 +33,14 @@ $phpbb_class_loader->register(); $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx); $phpbb_class_loader_ext->register(); -$phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, "$phpbb_root_path/config"); +$phpbb_config_php_handler = new \phpbb\config_php($phpbb_root_path, $phpEx); +extract($phpbb_config_php_handler->get_all()); + +$phpbb_container_factory = new \phpbb\di\container_factory($phpbb_config_php_handler, $phpbb_root_path, $phpEx); +$phpbb_container_factory->set_use_extensions(false); +$phpbb_container_factory->set_dump_container(false); + +$phpbb_container = $phpbb_container_factory->get_container(); $phpbb_container->get('request')->enable_super_globals(); require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx); diff --git a/phpBB/phpbb/config_php.php b/phpBB/phpbb/config_php.php index 13ca533ade..d502088897 100644 --- a/phpBB/phpbb/config_php.php +++ b/phpBB/phpbb/config_php.php @@ -102,6 +102,7 @@ class config_php return false; } } + return true; } }