Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2014-02-20 02:56:14 +0400
committermattab <matthieu.aubry@gmail.com>2014-02-20 02:56:14 +0400
commitfce4bd9d4a0a739636b9c27baaea12ed32d7e10c (patch)
tree418106e36b3891d6fc8a544ca8956db64a977ea2 /core/Console.php
parent6a2fa62f318298ec8b91c474d6acf443dddb5fe9 (diff)
Fix console not working
Diffstat (limited to 'core/Console.php')
-rw-r--r--core/Console.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/core/Console.php b/core/Console.php
index 086cbaf2c7..638a810e46 100644
--- a/core/Console.php
+++ b/core/Console.php
@@ -61,7 +61,7 @@ class Console
*/
private function getAvailableCommands()
{
- $commands = array('Piwik\CliMulti\RequestCommand');
+ $commands = $this->getDefaultCommands();
/**
* Triggered to gather all available console commands. Plugins that want to expose new console commands
@@ -96,7 +96,6 @@ class Console
return $config;
} catch (\Exception $e) {
echo ($e->getMessage() . "\n\n");
- exit(1);
}
}
@@ -106,4 +105,17 @@ class Console
$pluginsManager = Plugin\Manager::getInstance();
$pluginsManager->loadPlugins($pluginsToLoad);
}
+
+ private function getDefaultCommands()
+ {
+ $commands = array(
+ 'Piwik\CliMulti\RequestCommand'
+ );
+
+ if (class_exists('Piwik\Plugins\CloudAdmin\CloudAdmin')) {
+ $extra = new \Piwik\Plugins\CloudAdmin\CloudAdmin();
+ $extra->addConsoleCommands($commands);
+ }
+ return $commands;
+ }
}