diff options
-rwxr-xr-x | console | 1 | ||||
-rw-r--r-- | core/Console.php | 9 | ||||
-rw-r--r-- | misc/cron/archive.php | 1 |
3 files changed, 2 insertions, 9 deletions
@@ -26,5 +26,4 @@ if (!Piwik\Common::isPhpCliMode()) { } $console = new Piwik\Console(); -$console->init(); $console->run();
\ No newline at end of file diff --git a/core/Console.php b/core/Console.php index 423c06d771..d0268569c9 100644 --- a/core/Console.php +++ b/core/Console.php @@ -10,16 +10,16 @@ namespace Piwik; use Piwik\Plugin\Manager as PluginManager; use Symfony\Component\Console\Application; -use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Input\StringInput; use Symfony\Component\Console\Output\OutputInterface; class Console extends Application { public function __construct() { + $this->checkCompatibility(); + parent::__construct(); $option = new InputOption('piwik-domain', @@ -31,11 +31,6 @@ class Console extends Application $this->getDefinition()->addOption($option); } - public function init() - { - $this->checkCompatibility(); - } - public function doRun(InputInterface $input, OutputInterface $output) { $this->initPiwikHost($input); diff --git a/misc/cron/archive.php b/misc/cron/archive.php index af0f9f8c84..3975f90bea 100644 --- a/misc/cron/archive.php +++ b/misc/cron/archive.php @@ -47,7 +47,6 @@ try 'php archive.php --url=http://your.piwik/path' if (isset($_SERVER['argv']) && Piwik\Console::isSupported()) { $console = new Piwik\Console(); - $console->init(); // manipulate command line arguments so CoreArchiver command will be executed $script = array_shift($_SERVER['argv']); |