diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-07-14 08:20:14 -0700 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-07-14 08:20:14 -0700 |
commit | fa3cdb6bf2cfdca9c26168bd258752718bc8a43f (patch) | |
tree | b3576fc17448f058122d52a9540e0d54beaac4f9 /phpBB/includes/functions_container.php | |
parent | 51ab2c710e91d98bb182dded1e9d5462451151e8 (diff) | |
parent | e6e2a50062eca8b640822b8f616ea4bb23b23566 (diff) | |
download | forums-fa3cdb6bf2cfdca9c26168bd258752718bc8a43f.tar forums-fa3cdb6bf2cfdca9c26168bd258752718bc8a43f.tar.gz forums-fa3cdb6bf2cfdca9c26168bd258752718bc8a43f.tar.bz2 forums-fa3cdb6bf2cfdca9c26168bd258752718bc8a43f.tar.xz forums-fa3cdb6bf2cfdca9c26168bd258752718bc8a43f.zip |
Merge pull request #7 from igorw/ticket/11574
[ticket/11574] Fix various path issues in the updater
Diffstat (limited to 'phpBB/includes/functions_container.php')
-rw-r--r-- | phpBB/includes/functions_container.php | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/phpBB/includes/functions_container.php b/phpBB/includes/functions_container.php index d302b75350..e22fa9919a 100644 --- a/phpBB/includes/functions_container.php +++ b/phpBB/includes/functions_container.php @@ -53,8 +53,8 @@ function phpbb_create_container(array $extensions, $phpbb_root_path, $php_ext) */ function phpbb_create_install_container($phpbb_root_path, $php_ext) { - $other_config_path = $phpbb_root_path . 'install/update/new/config'; - $config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path . 'config'; + $other_config_path = $phpbb_root_path . 'install/update/new/config/'; + $config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path . 'config/'; $core = new phpbb_di_extension_core($config_path); $container = phpbb_create_container(array($core), $phpbb_root_path, $php_ext); @@ -74,6 +74,30 @@ function phpbb_create_install_container($phpbb_root_path, $php_ext) } /** +* Create updater container +* +* @param string $phpbb_root_path Root path +* @param string $php_ext PHP Extension +* @param array $config_path Path to config directory +* @return ContainerBuilder object (compiled) +*/ +function phpbb_create_update_container($phpbb_root_path, $php_ext, $config_path) +{ + return phpbb_create_compiled_container( + array( + new phpbb_di_extension_config($phpbb_root_path . 'config.' . $php_ext), + new phpbb_di_extension_core($config_path), + ), + array( + new phpbb_di_pass_collection_pass(), + new phpbb_di_pass_kernel_pass(), + ), + $phpbb_root_path, + $php_ext + ); +} + +/** * Create a compiled ContainerBuilder object * * @param array $extensions Array of Container extension objects |