diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-06-27 21:35:53 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-07-07 01:02:23 +0200 |
commit | cefffe07771162da3dba1bbc7febc611b508e7aa (patch) | |
tree | aa6fd7a532a4cbf4b14f468fb1cceb105b0fd5f3 /phpBB/download | |
parent | 20912d7af2428200fc02fe87b55071240b2a9315 (diff) | |
download | forums-cefffe07771162da3dba1bbc7febc611b508e7aa.tar forums-cefffe07771162da3dba1bbc7febc611b508e7aa.tar.gz forums-cefffe07771162da3dba1bbc7febc611b508e7aa.tar.bz2 forums-cefffe07771162da3dba1bbc7febc611b508e7aa.tar.xz forums-cefffe07771162da3dba1bbc7febc611b508e7aa.zip |
[ticket/12775] Load the config file before constants.php
PHPBB3-12775
Diffstat (limited to 'phpBB/download')
-rw-r--r-- | phpBB/download/file.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 636a73a95f..84c1c51c1c 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -39,29 +39,27 @@ if (isset($_GET['avatar'])) { require($phpbb_root_path . 'includes/startup.' . $phpEx); + require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx); + $phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx); + $phpbb_class_loader->register(); + + $phpbb_config_php_handler = new \phpbb\config_php($phpbb_root_path, $phpEx); + extract($phpbb_config_php_handler->get_all()); + if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type)) { exit; } - require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx); - require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx); require($phpbb_root_path . 'includes/functions_download' . '.' . $phpEx); require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); // Setup class loader first - $phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx); - $phpbb_class_loader->register(); $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx); $phpbb_class_loader_ext->register(); - phpbb_load_extensions_autoloaders($phpbb_root_path); - - $phpbb_config_php_handler = new \phpbb\config_php($phpbb_root_path, $phpEx); - extract($phpbb_config_php_handler->get_all()); - // Set up container $phpbb_container_factory = new \phpbb\di\container_factory($phpbb_config_php_handler, $phpbb_root_path, $phpEx); $phpbb_container = $phpbb_container_factory->get_container(); |