mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-11 11:24:23 +02:00
Merge branch '3.2.x'
* 3.2.x: [ticket/15123] modified return error codes [ticket/15123] modified language strings [ticket/15123] modified language string [ticket/15123] removed blank spaces [ticket/15123] add check before enable or disable extension
This commit is contained in:
commit
e2701bd28b
@ -110,8 +110,10 @@ $lang = array_merge($lang, array(
|
||||
|
||||
'CLI_EXTENSION_DISABLE_FAILURE' => 'Could not disable extension %s',
|
||||
'CLI_EXTENSION_DISABLE_SUCCESS' => 'Successfully disabled extension %s',
|
||||
'CLI_EXTENSION_DISABLED' => 'Extension %s is not enabled',
|
||||
'CLI_EXTENSION_ENABLE_FAILURE' => 'Could not enable extension %s',
|
||||
'CLI_EXTENSION_ENABLE_SUCCESS' => 'Successfully enabled extension %s',
|
||||
'CLI_EXTENSION_ENABLED' => 'Extension %s is already enabled',
|
||||
'CLI_EXTENSION_NAME' => 'Name of the extension',
|
||||
'CLI_EXTENSION_PURGE_FAILURE' => 'Could not purge extension %s',
|
||||
'CLI_EXTENSION_PURGE_SUCCESS' => 'Successfully purged extension %s',
|
||||
|
@ -37,6 +37,13 @@ class disable extends command
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
|
||||
$name = $input->getArgument('extension-name');
|
||||
|
||||
if (!$this->manager->is_enabled($name))
|
||||
{
|
||||
$io->error($this->user->lang('CLI_EXTENSION_DISABLED', $name));
|
||||
return 2;
|
||||
}
|
||||
|
||||
$this->manager->disable($name);
|
||||
$this->manager->load_extensions();
|
||||
|
||||
|
@ -37,6 +37,13 @@ class enable extends command
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
|
||||
$name = $input->getArgument('extension-name');
|
||||
|
||||
if ($this->manager->is_enabled($name))
|
||||
{
|
||||
$io->error($this->user->lang('CLI_EXTENSION_ENABLED', $name));
|
||||
return 2;
|
||||
}
|
||||
|
||||
$this->manager->enable($name);
|
||||
$this->manager->load_extensions();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user