diff options
Diffstat (limited to 'phpBB/phpbb/console/command/config/delete.php')
-rw-r--r-- | phpBB/phpbb/console/command/config/delete.php | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/phpBB/phpbb/console/command/config/delete.php b/phpBB/phpbb/console/command/config/delete.php index 1f397904ca..2b53f27098 100644 --- a/phpBB/phpbb/console/command/config/delete.php +++ b/phpBB/phpbb/console/command/config/delete.php @@ -10,46 +10,29 @@ namespace phpbb\console\command\config; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -class delete extends \phpbb\console\command\command +class delete extends command { - /** @var \phpbb\config\config */ - protected $config; - - function __construct(\phpbb\config\config $config) - { - $this->config = $config; - - parent::__construct(); - } - protected function configure() { $this ->setName('config:delete') - ->setDescription('Sets a configuration option\'s value') + ->setDescription("Sets a configuration option's value") ->addArgument( - 'config-key', + 'key', InputArgument::REQUIRED, - 'The configuration option\'s name' - ) - ->addArgument( - 'use-cache', - InputArgument::OPTIONAL, - 'Whether this variable should be cached or if it changes too frequently to be efficiently cached.', - true + "The configuration option's name" ) ; } protected function execute(InputInterface $input, OutputInterface $output) { - $key = $input->getArgument('config-key'); - $use_cache = $input->getArgument('use-cache'); - $use_cache = (strtolower($use_cache) !== 'false' && $use_cache); + $key = $input->getArgument('key'); - $this->config->delete($key, $use_cache); + $this->config->delete($key); $output->writeln("<info>Successfully deleted config $key</info>"); } |