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:
authorThomas Steur <tsteur@users.noreply.github.com>2016-03-30 05:16:03 +0300
committerThomas Steur <tsteur@users.noreply.github.com>2016-03-30 05:16:03 +0300
commit61b5db3218347958f9f7c1b8127c4e483c8ccbe4 (patch)
treeac879d2e1ad7456bd830cec274ce0aa74a4b3a57
parent7ad2a7cc9f64f24f93e8c75736631fe20ef24f27 (diff)
parent62bafef4f2ecef3b33b049531f68fa0a108d4cc2 (diff)
Merge pull request #9978 from piwik/cronarchive_args_formatting2.16.1-b3
Fix missing whitespace between parameters in help text when using archive.php on cli
-rw-r--r--misc/cron/archive.php24
1 files changed, 8 insertions, 16 deletions
diff --git a/misc/cron/archive.php b/misc/cron/archive.php
index f719a2d3d4..0bc4daa1f1 100644
--- a/misc/cron/archive.php
+++ b/misc/cron/archive.php
@@ -22,18 +22,19 @@ define('PIWIK_ENABLE_SESSION_START', false);
require_once PIWIK_INCLUDE_PATH . '/core/Common.php';
-if (!empty($_SERVER['argv'][0])) {
- $callee = $_SERVER['argv'][0];
-} else {
- $callee = '';
-}
+if (Piwik\Common::isPhpCliMode()) {
+ require_once PIWIK_INCLUDE_PATH . "/core/bootstrap.php";
+
+ $console = new Piwik\Console();
-if (false !== strpos($callee, 'archive.php')) {
+ // manipulate command line arguments so CoreArchiver command will be executed
+ $script = array_shift($_SERVER['argv']);
$piwikHome = PIWIK_INCLUDE_PATH;
+
echo "
-------------------------------------------------------
Using this 'archive.php' script is no longer recommended.
-Please use '/path/to/php $piwikHome/console core:archive " . implode('', array_slice($_SERVER['argv'], 1)) . "' instead.
+Please use '/path/to/php $piwikHome/console core:archive " . implode(' ', $_SERVER['argv']) . "' instead.
To get help use '/path/to/php $piwikHome/console core:archive --help'
See also: http://piwik.org/docs/setup-auto-archiving/
@@ -41,16 +42,7 @@ If you cannot use the console because it requires CLI
try 'php archive.php --url=http://your.piwik/path'
-------------------------------------------------------
\n\n";
-}
-
-if (Piwik\Common::isPhpCliMode()) {
- require_once PIWIK_INCLUDE_PATH . "/core/bootstrap.php";
-
- $console = new Piwik\Console();
-
- // manipulate command line arguments so CoreArchiver command will be executed
- $script = array_shift($_SERVER['argv']);
array_unshift($_SERVER['argv'], 'core:archive');
array_unshift($_SERVER['argv'], $script);