mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 06:18:52 +00:00
[ticket/12685] Override getDefaultInputDefinition()
PHPBB3-12685
This commit is contained in:
parent
3eafeeb88d
commit
7cffedf5e3
2 changed files with 20 additions and 10 deletions
|
@ -44,7 +44,7 @@ $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_fil
|
||||||
|
|
||||||
$input = new ArgvInput();
|
$input = new ArgvInput();
|
||||||
|
|
||||||
if ($input->hasParameterOption(array('--safe-mode')))
|
if ($input->getParameterOption(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);
|
||||||
|
|
|
@ -37,9 +37,26 @@ class application extends \Symfony\Component\Console\Application
|
||||||
*/
|
*/
|
||||||
public function __construct($name, $version, \phpbb\user $user)
|
public function __construct($name, $version, \phpbb\user $user)
|
||||||
{
|
{
|
||||||
parent::__construct($name, $version);
|
|
||||||
|
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
parent::__construct($name, $version);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
protected function getDefaultInputDefinition()
|
||||||
|
{
|
||||||
|
$input_definition = parent::getDefaultInputDefinition();
|
||||||
|
|
||||||
|
$input_definition->addOption(new InputOption(
|
||||||
|
'safe-mode',
|
||||||
|
null,
|
||||||
|
InputOption::VALUE_NONE,
|
||||||
|
$this->user->lang('CLI_DESCRIPTION_OPTION_SAFE_MODE')
|
||||||
|
));
|
||||||
|
|
||||||
|
return $input_definition;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -66,13 +83,6 @@ class application extends \Symfony\Component\Console\Application
|
||||||
$this->user->lang('CLI_DESCRIPTION_OPTION_SHELL')
|
$this->user->lang('CLI_DESCRIPTION_OPTION_SHELL')
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->getDefinition()->addOption(new InputOption(
|
|
||||||
'--safe-mode',
|
|
||||||
null,
|
|
||||||
InputOption::VALUE_NONE,
|
|
||||||
$this->user->lang('CLI_DESCRIPTION_OPTION_SAFE_MODE')
|
|
||||||
));
|
|
||||||
|
|
||||||
return parent::getHelp();
|
return parent::getHelp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue