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-16 06:35:25 +0400
committerdiosmosis <benaka@piwik.pro>2014-10-16 06:37:39 +0400
commit8c48c25fe87d9668873329b39504b134dd05bc95 (patch)
treea93045df2b41b32e2f1a0b5fe47e6bb4b98a7168 /misc
parent9cd63ae9929e891a86054207a9dbe4d28b98e32f (diff)
Fix CronArchive token_auth refactor.
Diffstat (limited to 'misc')
-rw-r--r--misc/cron/archive.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/misc/cron/archive.php b/misc/cron/archive.php
index bf8ed3317b..b96440ab4d 100644
--- a/misc/cron/archive.php
+++ b/misc/cron/archive.php
@@ -56,9 +56,11 @@ if (isset($_SERVER['argv']) && Piwik\Console::isSupported()) {
$console->run();
} else { // if running via web request, use CronArchive directly
+ $archiver = new Piwik\CronArchive();
+
$token_auth = Piwik\Common::getRequestVar('token_auth', '', 'string');
- if ($token_auth !== $this->token_auth
+ 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>
@@ -67,6 +69,5 @@ if (isset($_SERVER['argv']) && Piwik\Console::isSupported()) {
<code>$ /path/to/php /path/to/piwik/console core:archive --url=http://your-website.org/path/to/piwik/</code>');
}
- $archiver = new Piwik\CronArchive();
$archiver->main();
} \ No newline at end of file