diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2016-03-29 10:39:28 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2016-03-29 10:39:28 +0300 |
commit | 62bafef4f2ecef3b33b049531f68fa0a108d4cc2 (patch) | |
tree | 229cc63f15ba33e7a9aa9cd678e160504bf9fd34 /misc | |
parent | 504eeae76e989a361267c8b559fab8f791424886 (diff) |
fix tests by making sure it works with cgi
Diffstat (limited to 'misc')
-rw-r--r-- | misc/cron/archive.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/misc/cron/archive.php b/misc/cron/archive.php index 5410ed7a1f..0bc4daa1f1 100644 --- a/misc/cron/archive.php +++ b/misc/cron/archive.php @@ -23,14 +23,18 @@ define('PIWIK_ENABLE_SESSION_START', false); require_once PIWIK_INCLUDE_PATH . '/core/Common.php'; if (Piwik\Common::isPhpCliMode()) { - $script = array_shift($_SERVER['argv']); - $args = implode(' ', $_SERVER['argv']); + 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']); $piwikHome = PIWIK_INCLUDE_PATH; + echo " ------------------------------------------------------- Using this 'archive.php' script is no longer recommended. -Please use '/path/to/php $piwikHome/console core:archive " . $args . "' 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/ @@ -39,11 +43,6 @@ try 'php archive.php --url=http://your.piwik/path' ------------------------------------------------------- \n\n"; - require_once PIWIK_INCLUDE_PATH . "/core/bootstrap.php"; - - $console = new Piwik\Console(); - - // manipulate command line arguments so CoreArchiver command will be executed array_unshift($_SERVER['argv'], 'core:archive'); array_unshift($_SERVER['argv'], $script); |