mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/12685] Setup class loader for extensions only if not in safe mode
PHPBB3-12685
This commit is contained in:
parent
a4972bb338
commit
7f4d425006
1 changed files with 6 additions and 3 deletions
|
@ -37,9 +37,6 @@ require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||||
require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||||
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
||||||
|
|
||||||
$phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx);
|
|
||||||
$phpbb_class_loader_ext->register();
|
|
||||||
|
|
||||||
$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
||||||
$phpbb_container_builder->set_dump_container(false);
|
$phpbb_container_builder->set_dump_container(false);
|
||||||
|
|
||||||
|
@ -50,6 +47,12 @@ if ($input->hasParameterOption(array('--safe-mode')))
|
||||||
$phpbb_container_builder->set_use_extensions(false);
|
$phpbb_container_builder->set_use_extensions(false);
|
||||||
$phpbb_container_builder->set_dump_container(false);
|
$phpbb_container_builder->set_dump_container(false);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$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_container = $phpbb_container_builder->get_container();
|
$phpbb_container = $phpbb_container_builder->get_container();
|
||||||
$phpbb_container->get('request')->enable_super_globals();
|
$phpbb_container->get('request')->enable_super_globals();
|
||||||
|
|
Loading…
Add table
Reference in a new issue