diff options
author | Rubén Calvo <rubencm@gmail.com> | 2017-09-07 12:53:44 +0200 |
---|---|---|
committer | Rubén Calvo <rubencm@gmail.com> | 2017-09-07 12:56:29 +0200 |
commit | aa23af38d4d3a13918e859005277955debd76acd (patch) | |
tree | ee0db4f6e886a676ea0e02d7fe029329009971ff /phpBB/phpbb/console/command/extension | |
parent | 1084b91b66245370052ec55f4ca653725fb85115 (diff) | |
download | forums-aa23af38d4d3a13918e859005277955debd76acd.tar forums-aa23af38d4d3a13918e859005277955debd76acd.tar.gz forums-aa23af38d4d3a13918e859005277955debd76acd.tar.bz2 forums-aa23af38d4d3a13918e859005277955debd76acd.tar.xz forums-aa23af38d4d3a13918e859005277955debd76acd.zip |
[ticket/15349] Check if extension is enableable before enable
PHPBB3-15346
Diffstat (limited to 'phpBB/phpbb/console/command/extension')
-rw-r--r-- | phpBB/phpbb/console/command/extension/enable.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/phpBB/phpbb/console/command/extension/enable.php b/phpBB/phpbb/console/command/extension/enable.php index a8312d5c15..b35fb9c4c6 100644 --- a/phpBB/phpbb/console/command/extension/enable.php +++ b/phpBB/phpbb/console/command/extension/enable.php @@ -37,6 +37,13 @@ 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)) { |