1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 19:54:12 +02:00

[ticket/14492] Allow specifying extensions to update & install

PHPBB3-14492
This commit is contained in:
Marc Alexander
2016-02-24 15:05:01 +01:00
parent eb1ade6768
commit 65d6e338a9
4 changed files with 34 additions and 1 deletions

View File

@@ -80,6 +80,10 @@ class install extends \phpbb\console\command\command
'config-file',
InputArgument::REQUIRED,
$this->language->lang('CLI_CONFIG_FILE'))
->addArgument(
'install-extensions',
InputArgument::OPTIONAL,
$this->language->lang('CLI_INSTALL_EXTENSIONS'))
->setDescription($this->language->lang('CLI_INSTALL_BOARD'))
;
}
@@ -147,6 +151,7 @@ class install extends \phpbb\console\command\command
}
$this->register_configuration($iohandler, $config);
$this->register_install_extensions($iohandler, $input);
try
{
@@ -204,4 +209,17 @@ class install extends \phpbb\console\command\command
$iohandler->set_input('script_path', $config['server']['script_path']);
$iohandler->set_input('submit_server', 'submit');
}
/**
* Register extensions to install during installation
*
* @param cli_iohandler $iohandler
* @param InputInterface $input
*/
private function register_install_extensions(cli_iohandler $iohandler, InputInterface $input)
{
$install_extensions = $input->getArgument('install-extensions');
$install_extensions = !empty($install_extensions) ? explode(',', $install_extensions) : array();
$iohandler->set_input('install-extensions', $install_extensions);
}
}