aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/console/command
diff options
context:
space:
mode:
authorMáté Bartus <CHItA@users.noreply.github.com>2017-09-07 14:08:14 +0200
committerGitHub <noreply@github.com>2017-09-07 14:08:14 +0200
commit9c0bb4afb583169d42a5f5ae3cb91d6c0a9449b7 (patch)
tree50a12e0730bdce65c5c91a487281252de9a214e9 /phpBB/phpbb/console/command
parent1084b91b66245370052ec55f4ca653725fb85115 (diff)
parentbf289de26f137bfe50608b6f9c549b306ede5b2a (diff)
downloadforums-9c0bb4afb583169d42a5f5ae3cb91d6c0a9449b7.tar
forums-9c0bb4afb583169d42a5f5ae3cb91d6c0a9449b7.tar.gz
forums-9c0bb4afb583169d42a5f5ae3cb91d6c0a9449b7.tar.bz2
forums-9c0bb4afb583169d42a5f5ae3cb91d6c0a9449b7.tar.xz
forums-9c0bb4afb583169d42a5f5ae3cb91d6c0a9449b7.zip
Merge pull request #4927 from rubencm/ticket/15349
[ticket/15349] Check if an extension if enableable before enable with CLI
Diffstat (limited to 'phpBB/phpbb/console/command')
-rw-r--r--phpBB/phpbb/console/command/extension/enable.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/phpbb/console/command/extension/enable.php b/phpBB/phpbb/console/command/extension/enable.php
index a8312d5c15..f92de0069c 100644
--- a/phpBB/phpbb/console/command/extension/enable.php
+++ b/phpBB/phpbb/console/command/extension/enable.php
@@ -37,11 +37,18 @@ class enable extends command
$io = new SymfonyStyle($input, $output);
$name = $input->getArgument('extension-name');
+ $extension = $this->manager->get_extension($name);
+
+ if (!$extension->is_enableable())
+ {
+ $io->error($this->user->lang('CLI_EXTENSION_NOT_ENABLEABLE', $name));
+ return 1;
+ }
if ($this->manager->is_enabled($name))
{
$io->error($this->user->lang('CLI_EXTENSION_ENABLED', $name));
- return 2;
+ return 1;
}
$this->manager->enable($name);