aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Friedman <maf675@gmail.com>2019-10-27 16:22:24 -0700
committerMatt Friedman <maf675@gmail.com>2019-10-27 16:22:24 -0700
commit7ae8f98ec648cde939825040d92aeef9ce85b8ca (patch)
tree6c50a793a68e91b73e7b4a86d8c93cb695b591d7
parentb6f400a01479cf1fe847e81739cb1e74a70ecd4e (diff)
downloadforums-7ae8f98ec648cde939825040d92aeef9ce85b8ca.tar
forums-7ae8f98ec648cde939825040d92aeef9ce85b8ca.tar.gz
forums-7ae8f98ec648cde939825040d92aeef9ce85b8ca.tar.bz2
forums-7ae8f98ec648cde939825040d92aeef9ce85b8ca.tar.xz
forums-7ae8f98ec648cde939825040d92aeef9ce85b8ca.zip
[ticket/16192] Fix CLI extension not enableable messages
PHPBB3-16192
-rw-r--r--phpBB/phpbb/console/command/extension/enable.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/phpBB/phpbb/console/command/extension/enable.php b/phpBB/phpbb/console/command/extension/enable.php
index f007009aa0..504b5546b3 100644
--- a/phpBB/phpbb/console/command/extension/enable.php
+++ b/phpBB/phpbb/console/command/extension/enable.php
@@ -46,9 +46,11 @@ class enable extends command
$extension = $this->manager->get_extension($name);
- if (!$extension->is_enableable())
+ if (($enableable = $extension->is_enableable()) !== true)
{
- $io->error($this->user->lang('CLI_EXTENSION_NOT_ENABLEABLE', $name));
+ $message = !empty($enableable) ? $enableable : $this->user->lang('CLI_EXTENSION_NOT_ENABLEABLE', $name);
+ $message = is_array($message) ? implode(PHP_EOL, $message) : $message;
+ $io->error($message);
return 1;
}
@@ -69,10 +71,7 @@ class enable extends command
}
else
{
- $enableable = $this->manager->get_extension($name)->is_enableable();
- $message = !empty($enableable) ? $enableable : $this->user->lang('CLI_EXTENSION_ENABLE_FAILURE');
- $message = is_array($message) ? implode(PHP_EOL, $message) : $message;
- $io->error($message, $name);
+ $io->error($this->user->lang('CLI_EXTENSION_ENABLE_FAILURE', $name));
return 1;
}
}