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
path: root/misc
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2014-10-27 03:54:12 +0300
committerdiosmosis <benaka@piwik.pro>2014-10-27 03:55:03 +0300
commitf4dbc61263d401a003c300847af19cf4b1f5db13 (patch)
tree4a2df46777d7a784f7064bad66dacf3f42b1f057 /misc
parentc02da3ff183c18cb9e01c769ce74dfea95c9e261 (diff)
Refs #6513, make sure archive.php can be run w/ php-cgi (remove regression that caused it to fail) and add system test to catch future regressions, if any.
Diffstat (limited to 'misc')
-rw-r--r--misc/cron/archive.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/misc/cron/archive.php b/misc/cron/archive.php
index b96440ab4d..9504594873 100644
--- a/misc/cron/archive.php
+++ b/misc/cron/archive.php
@@ -58,15 +58,17 @@ if (isset($_SERVER['argv']) && Piwik\Console::isSupported()) {
} else { // if running via web request, use CronArchive directly
$archiver = new Piwik\CronArchive();
- $token_auth = Piwik\Common::getRequestVar('token_auth', '', 'string');
+ if (!Piwik\Common::isPhpCliMode()) {
+ $token_auth = Piwik\Common::getRequestVar('token_auth', '', 'string');
- if ($token_auth !== $archiver->getTokenAuth()
- || strlen($token_auth) != 32
- ) {
- die('<b>You must specify the Super User token_auth as a parameter to this script, eg. <code>?token_auth=XYZ</code> if you wish to run this script through the browser. </b><br>
- However it is recommended to run it <a href="http://piwik.org/docs/setup-auto-archiving/">via cron in the command line</a>, since it can take a long time to run.<br/>
- In a shell, execute for example the following to trigger archiving on the local Piwik server:<br/>
- <code>$ /path/to/php /path/to/piwik/console core:archive --url=http://your-website.org/path/to/piwik/</code>');
+ if ($token_auth !== $archiver->getTokenAuth()
+ || strlen($token_auth) != 32
+ ) {
+ die('<b>You must specify the Super User token_auth as a parameter to this script, eg. <code>?token_auth=XYZ</code> if you wish to run this script through the browser. </b><br>
+ However it is recommended to run it <a href="http://piwik.org/docs/setup-auto-archiving/">via cron in the command line</a>, since it can take a long time to run.<br/>
+ In a shell, execute for example the following to trigger archiving on the local Piwik server:<br/>
+ <code>$ /path/to/php /path/to/piwik/console core:archive --url=http://your-website.org/path/to/piwik/</code>');
+ }
}
$archiver->main();