aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/console/command/extension
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/console/command/extension')
-rw-r--r--phpBB/phpbb/console/command/extension/command.php4
-rw-r--r--phpBB/phpbb/console/command/extension/disable.php8
-rw-r--r--phpBB/phpbb/console/command/extension/enable.php8
-rw-r--r--phpBB/phpbb/console/command/extension/purge.php8
-rw-r--r--phpBB/phpbb/console/command/extension/show.php4
5 files changed, 16 insertions, 16 deletions
diff --git a/phpBB/phpbb/console/command/extension/command.php b/phpBB/phpbb/console/command/extension/command.php
index 21bb640504..364d954082 100644
--- a/phpBB/phpbb/console/command/extension/command.php
+++ b/phpBB/phpbb/console/command/extension/command.php
@@ -20,11 +20,11 @@ abstract class command extends \phpbb\console\command\command
/** @var \phpbb\log\log */
protected $log;
- public function __construct(\phpbb\extension\manager $manager, \phpbb\log\log $log)
+ public function __construct(\phpbb\user $user, \phpbb\extension\manager $manager, \phpbb\log\log $log)
{
$this->manager = $manager;
$this->log = $log;
- parent::__construct();
+ parent::__construct($user);
}
}
diff --git a/phpBB/phpbb/console/command/extension/disable.php b/phpBB/phpbb/console/command/extension/disable.php
index c04848aa01..1eee16cbd9 100644
--- a/phpBB/phpbb/console/command/extension/disable.php
+++ b/phpBB/phpbb/console/command/extension/disable.php
@@ -22,11 +22,11 @@ class disable extends command
{
$this
->setName('extension:disable')
- ->setDescription('Disables the specified extension.')
+ ->setDescription($this->user->lang('CLI_DESCRIPTION_DISABLE_EXTENSION'))
->addArgument(
'extension-name',
InputArgument::REQUIRED,
- 'Name of the extension'
+ $this->user->lang('CLI_EXTENSION_NAME')
)
;
}
@@ -39,13 +39,13 @@ class disable extends command
if ($this->manager->is_enabled($name))
{
- $output->writeln("<error>Could not disable extension $name</error>");
+ $output->writeln('<error>' . $this->user->lang('CLI_EXTENSION_DISABLE_FAILURE', $name) . '</error>');
return 1;
}
else
{
$this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_DISABLE', time(), array($name));
- $output->writeln("<info>Successfully disabled extension $name</info>");
+ $output->writeln('<info>' . $this->user->lang('CLI_EXTENSION_DISABLE_SUCCESS', $name) . '</info>');
return 0;
}
}
diff --git a/phpBB/phpbb/console/command/extension/enable.php b/phpBB/phpbb/console/command/extension/enable.php
index 86a034cdf4..59ff11e9b7 100644
--- a/phpBB/phpbb/console/command/extension/enable.php
+++ b/phpBB/phpbb/console/command/extension/enable.php
@@ -22,11 +22,11 @@ class enable extends command
{
$this
->setName('extension:enable')
- ->setDescription('Enables the specified extension.')
+ ->setDescription($this->user->lang('CLI_DESCRIPTION_ENABLE_EXTENSION'))
->addArgument(
'extension-name',
InputArgument::REQUIRED,
- 'Name of the extension'
+ $this->user->lang('CLI_EXTENSION_NAME')
)
;
}
@@ -40,12 +40,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>Successfully enabled extension $name</info>");
+ $output->writeln('<info>' . $this->user->lang('CLI_EXTENSION_ENABLE_SUCCESS', $name) . '</info>');
return 0;
}
else
{
- $output->writeln("<error>Could not enable extension $name</error>");
+ $output->writeln('<error>' . $this->user->lang('CLI_EXTENSION_ENABLE_FAILURE', $name) . '</error>');
return 1;
}
}
diff --git a/phpBB/phpbb/console/command/extension/purge.php b/phpBB/phpbb/console/command/extension/purge.php
index 841598b90a..517e9a74c9 100644
--- a/phpBB/phpbb/console/command/extension/purge.php
+++ b/phpBB/phpbb/console/command/extension/purge.php
@@ -22,11 +22,11 @@ class purge extends command
{
$this
->setName('extension:purge')
- ->setDescription('Purges the specified extension.')
+ ->setDescription($this->user->lang('CLI_DESCRIPTION_PURGE_EXTENSION'))
->addArgument(
'extension-name',
InputArgument::REQUIRED,
- 'Name of the extension'
+ $this->user->lang('CLI_EXTENSION_NAME')
)
;
}
@@ -39,13 +39,13 @@ class purge extends command
if ($this->manager->is_enabled($name))
{
- $output->writeln("<error>Could not purge extension $name</error>");
+ $output->writeln('<error>' . $this->user->lang('CLI_EXTENSION_PURGE_FAILURE', $name) . '</error>');
return 1;
}
else
{
$this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_PURGE', time(), array($name));
- $output->writeln("<info>Successfully purge extension $name</info>");
+ $output->writeln('<info>' . $this->user->lang('CLI_EXTENSION_PURGE_SUCCESS', $name) . '</info>');
return 0;
}
}
diff --git a/phpBB/phpbb/console/command/extension/show.php b/phpBB/phpbb/console/command/extension/show.php
index 2db1c59e24..6ce9607098 100644
--- a/phpBB/phpbb/console/command/extension/show.php
+++ b/phpBB/phpbb/console/command/extension/show.php
@@ -21,7 +21,7 @@ class show extends command
{
$this
->setName('extension:show')
- ->setDescription('Lists all extensions in the database and on the filesystem.')
+ ->setDescription($this->user->lang('CLI_DESCRIPTION_LIST_EXTENSIONS'))
;
}
@@ -32,7 +32,7 @@ class show extends command
if (empty($all))
{
- $output->writeln('<comment>No extensions were found.</comment>');
+ $output->writeln('<comment>' . $this->user->lang('CLI_EXTENSION_NOT_FOUND') . '</comment>');
return 3;
}