mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 11:58:53 +00:00
[ticket/12655] Don't try to restore the definition in the help
PHPBB3-12655
This commit is contained in:
parent
012702307b
commit
5e9c8a0cea
1 changed files with 4 additions and 9 deletions
|
@ -13,6 +13,9 @@
|
||||||
|
|
||||||
namespace phpbb\console;
|
namespace phpbb\console;
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Input\ArgvInput;
|
||||||
|
use Symfony\Component\Console\Output\ConsoleOutput;
|
||||||
|
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
||||||
use Symfony\Component\Console\Shell;
|
use Symfony\Component\Console\Shell;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
|
@ -60,11 +63,6 @@ class application extends \Symfony\Component\Console\Application
|
||||||
return parent::getHelp();
|
return parent::getHelp();
|
||||||
}
|
}
|
||||||
|
|
||||||
// We store the definition to restore it later.
|
|
||||||
// Otherwise, in the shell mode the --shell option
|
|
||||||
// will be available for all command.
|
|
||||||
$definition_backup = $this->getDefinition();
|
|
||||||
|
|
||||||
$this->getDefinition()->addOption(new InputOption(
|
$this->getDefinition()->addOption(new InputOption(
|
||||||
'--shell',
|
'--shell',
|
||||||
'-s',
|
'-s',
|
||||||
|
@ -72,10 +70,7 @@ class application extends \Symfony\Component\Console\Application
|
||||||
$this->user->lang('CLI_DESCRIPTION_OPTION_SHELL')
|
$this->user->lang('CLI_DESCRIPTION_OPTION_SHELL')
|
||||||
));
|
));
|
||||||
|
|
||||||
$help_message = parent::getHelp();
|
return parent::getHelp();
|
||||||
$this->setDefinition($definition_backup);
|
|
||||||
|
|
||||||
return $help_message;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue