aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/console/command/extension/enable.php
diff options
context:
space:
mode:
authorMatt Friedman <maf675@gmail.com>2016-12-08 14:24:02 -0800
committerMatt Friedman <maf675@gmail.com>2016-12-08 14:24:02 -0800
commitb17fa7dfa588fc191f4ed268b88dcaec40294acb (patch)
treef24fb0cca88d44e8c3c3afbfbced97e07061b6d3 /phpBB/phpbb/console/command/extension/enable.php
parentd275fefc69bae24f547802d824607c9a054ff6d2 (diff)
downloadforums-b17fa7dfa588fc191f4ed268b88dcaec40294acb.tar
forums-b17fa7dfa588fc191f4ed268b88dcaec40294acb.tar.gz
forums-b17fa7dfa588fc191f4ed268b88dcaec40294acb.tar.bz2
forums-b17fa7dfa588fc191f4ed268b88dcaec40294acb.tar.xz
forums-b17fa7dfa588fc191f4ed268b88dcaec40294acb.zip
[ticket/14895] Use SymfonyStyle in all CLI
PHPBB3-14895
Diffstat (limited to 'phpBB/phpbb/console/command/extension/enable.php')
-rw-r--r--phpBB/phpbb/console/command/extension/enable.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/phpBB/phpbb/console/command/extension/enable.php b/phpBB/phpbb/console/command/extension/enable.php
index 59ff11e9b7..14077d688b 100644
--- a/phpBB/phpbb/console/command/extension/enable.php
+++ b/phpBB/phpbb/console/command/extension/enable.php
@@ -15,6 +15,7 @@ namespace phpbb\console\command\extension;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Style\SymfonyStyle;
class enable extends command
{
@@ -33,6 +34,8 @@ class enable extends command
protected function execute(InputInterface $input, OutputInterface $output)
{
+ $io = new SymfonyStyle($input, $output);
+
$name = $input->getArgument('extension-name');
$this->manager->enable($name);
$this->manager->load_extensions();
@@ -40,12 +43,12 @@ class enable extends command
if ($this->manager->is_enabled($name))
{
$this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_ENABLE', time(), array($name));
- $output->writeln('<info>' . $this->user->lang('CLI_EXTENSION_ENABLE_SUCCESS', $name) . '</info>');
+ $io->success($this->user->lang('CLI_EXTENSION_ENABLE_SUCCESS', $name));
return 0;
}
else
{
- $output->writeln('<error>' . $this->user->lang('CLI_EXTENSION_ENABLE_FAILURE', $name) . '</error>');
+ $io->error($this->user->lang('CLI_EXTENSION_ENABLE_FAILURE', $name));
return 1;
}
}