mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 18:26:32 +02:00
[ticket/15257] Provide extension not enableable messages
PHPBB3-15257
This commit is contained in:
committed by
Marc Alexander
parent
b6c230753e
commit
975fe1e153
@@ -69,7 +69,10 @@ class enable extends command
|
||||
}
|
||||
else
|
||||
{
|
||||
$io->error($this->user->lang('CLI_EXTENSION_ENABLE_FAILURE', $name));
|
||||
$enableable = $this->manager->get_extension($name)->is_enableable();
|
||||
$message = !empty($enableable) ? $enableable : $this->user->lang('CLI_EXTENSION_ENABLE_FAILURE');
|
||||
$message = is_array($message) ? implode(PHP_EOL, $message) : $message;
|
||||
$io->error($message, $name);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@@ -22,7 +22,8 @@ interface extension_interface
|
||||
/**
|
||||
* Indicate whether or not the extension can be enabled.
|
||||
*
|
||||
* @return bool
|
||||
* @return bool|array True if extension is enableable, array of reasons
|
||||
* if not, false for generic reason.
|
||||
*/
|
||||
public function is_enableable();
|
||||
|
||||
|
Reference in New Issue
Block a user