diff options
| author | Máté Bartus <mate.bartus@gmail.com> | 2015-08-28 12:00:46 +0200 |
|---|---|---|
| committer | Máté Bartus <mate.bartus@gmail.com> | 2015-08-28 12:00:46 +0200 |
| commit | e91e525e8a81f3bd7a90bbb7b94a351f950003d8 (patch) | |
| tree | 5a10c7f943cae593a53fb67d1ba0f9761a372c02 /phpBB/bin/phpbbcli.php | |
| parent | e8219e8610d37dc6fe3c15a5f9c4ab2664335ed7 (diff) | |
| parent | c868582e4412d482853e7975b1cff1965f51ce25 (diff) | |
| download | forums-e91e525e8a81f3bd7a90bbb7b94a351f950003d8.tar forums-e91e525e8a81f3bd7a90bbb7b94a351f950003d8.tar.gz forums-e91e525e8a81f3bd7a90bbb7b94a351f950003d8.tar.bz2 forums-e91e525e8a81f3bd7a90bbb7b94a351f950003d8.tar.xz forums-e91e525e8a81f3bd7a90bbb7b94a351f950003d8.zip | |
Merge pull request #3858 from Nicofuma/ticket/14125
[ticket/14125] Add --env option to all CLI commands
Diffstat (limited to 'phpBB/bin/phpbbcli.php')
| -rwxr-xr-x | phpBB/bin/phpbbcli.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 18657aed0a..e5992f7536 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -46,13 +46,17 @@ require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx); $phpbb_container = $phpbb_container_builder->with_config($phpbb_config_php_file); -$phpbb_container_builder->without_cache(); - $input = new ArgvInput(); +if ($input->hasParameterOption(array('--env'))) +{ + $phpbb_container_builder->with_environment($input->getParameterOption('--env')); +} + if ($input->hasParameterOption(array('--safe-mode'))) { $phpbb_container_builder->without_extensions(); + $phpbb_container_builder->without_cache(); } else { @@ -68,6 +72,8 @@ require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx); $user = $phpbb_container->get('user'); $user->add_lang('acp/common'); $user->add_lang('cli'); + +/* @var $lang \phpbb\language\language */ $lang = $phpbb_container->get('language'); $application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION, $lang); |
