diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-02-18 03:16:17 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-02-18 03:16:17 +0400 |
commit | cba1a60e0c16ab12da77efdc91ee783bc02b8b52 (patch) | |
tree | b3ec8996158eee942af4239a6741be12c9fa28c9 /core/CliMulti.php | |
parent | d78a9c5af7be0e1b3258abe3a54d44e0b238cf98 (diff) |
Add new piwik-domain generic option to the console.
Diffstat (limited to 'core/CliMulti.php')
-rw-r--r-- | core/CliMulti.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/CliMulti.php b/core/CliMulti.php index 3239061661..42285fd028 100644 --- a/core/CliMulti.php +++ b/core/CliMulti.php @@ -90,12 +90,12 @@ class CliMulti { } } - private function buildCommand($query, $outputFile) + private function buildCommand($hostname, $query, $outputFile) { $bin = $this->findPhpBinary(); - return sprintf('%s -q %s/console climulti:request %s > %s 2>&1 &', - $bin, PIWIK_INCLUDE_PATH, escapeshellarg($query), $outputFile); + return sprintf('%s -q %s/console climulti:request --piwik-domain=%s %s > %s 2>&1 &', + $bin, PIWIK_INCLUDE_PATH, escapeshellarg($hostname), escapeshellarg($query), $outputFile); } private function getResponse() @@ -223,8 +223,10 @@ class CliMulti { $url = $this->appendTestmodeParamToUrlIfNeeded($url); $query = Url::getQueryFromUrl($url, array('pid' => $cmdId)); - $command = $this->buildCommand($query, $output->getPathToFile()); + $hostname = parse_url($url, PHP_URL_HOST); + $command = $this->buildCommand($hostname, $query, $output->getPathToFile()); + Log::debug($command); shell_exec($command); } |