Skip to content
Extraits de code Groupes Projets
Valider 504eeae7 rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

fix missing whitespace between parameters in help text when using archive.php on cli

parent 4cf7a648
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -22,18 +22,15 @@ 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()) {
$script = array_shift($_SERVER['argv']);
$args = implode(' ', $_SERVER['argv']);
if (false !== strpos($callee, 'archive.php')) {
$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 " . $args . "' instead.
To get help use '/path/to/php $piwikHome/console core:archive --help'
See also: http://piwik.org/docs/setup-auto-archiving/
......@@ -41,16 +38,12 @@ 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);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter