mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 14:28:56 +00:00
[ticket/15349] Check if extension is enableable before enable
PHPBB3-15346
This commit is contained in:
parent
1084b91b66
commit
aa23af38d4
1 changed files with 7 additions and 0 deletions
|
@ -37,6 +37,13 @@ class enable extends command
|
||||||
$io = new SymfonyStyle($input, $output);
|
$io = new SymfonyStyle($input, $output);
|
||||||
|
|
||||||
$name = $input->getArgument('extension-name');
|
$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))
|
if ($this->manager->is_enabled($name))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue