From aa23af38d4d3a13918e859005277955debd76acd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Calvo?= Date: Thu, 7 Sep 2017 12:53:44 +0200 Subject: [ticket/15349] Check if extension is enableable before enable PHPBB3-15346 --- phpBB/phpbb/console/command/extension/enable.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'phpBB/phpbb/console/command/extension') 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)) { -- cgit v1.2.1