phpBB

Code Changes

File: phpbb/console/command/extension/enable.php

  Unmodified   Added   Modified   Removed
Line 37Line 37
		$io = new SymfonyStyle($input, $output);

$name = $input->getArgument('extension-name');

		$io = new SymfonyStyle($input, $output);

$name = $input->getArgument('extension-name');

 

if (!$this->manager->is_available($name))
{
$io->error($this->user->lang('CLI_EXTENSION_NOT_EXIST', $name));
return 1;
}

$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));


if ($this->manager->is_enabled($name))
{
$io->error($this->user->lang('CLI_EXTENSION_ENABLED', $name));

			return 2;

			return 1;

		}

$this->manager->enable($name);

		}

$this->manager->enable($name);