diff options
author | Marc Alexander <admin@m-a-styles.de> | 2019-10-03 11:06:58 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-10-03 11:06:58 +0200 |
commit | 1eed2f98c30210d02b8ca3bf5b167fae67dc64dd (patch) | |
tree | 7364da57623f9bb48fe25a9dccc80426040a73e7 /phpBB/phpbb | |
parent | b6c230753ee17fe65b43929d4fc10248ea2a23bf (diff) | |
parent | e54aa94e7714483f0f5ef8c18e21317a1f0524f6 (diff) | |
download | forums-1eed2f98c30210d02b8ca3bf5b167fae67dc64dd.tar forums-1eed2f98c30210d02b8ca3bf5b167fae67dc64dd.tar.gz forums-1eed2f98c30210d02b8ca3bf5b167fae67dc64dd.tar.bz2 forums-1eed2f98c30210d02b8ca3bf5b167fae67dc64dd.tar.xz forums-1eed2f98c30210d02b8ca3bf5b167fae67dc64dd.zip |
Merge pull request #5555 from senky/ticket/15257
[ticket/15257] Provide extension not enableable messages
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/console/command/extension/enable.php | 5 | ||||
-rw-r--r-- | phpBB/phpbb/extension/extension_interface.php | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/phpbb/console/command/extension/enable.php b/phpBB/phpbb/console/command/extension/enable.php index a6f5b10e86..f007009aa0 100644 --- a/phpBB/phpbb/console/command/extension/enable.php +++ b/phpBB/phpbb/console/command/extension/enable.php @@ -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; } } diff --git a/phpBB/phpbb/extension/extension_interface.php b/phpBB/phpbb/extension/extension_interface.php index 6a6b6adb8f..46072d420c 100644 --- a/phpBB/phpbb/extension/extension_interface.php +++ b/phpBB/phpbb/extension/extension_interface.php @@ -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(); |