aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/console/command/extension/enable.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/console/command/extension/enable.php')
-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);