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:
authorMatthieu Aubry <mattab@users.noreply.github.com>2017-10-06 10:14:24 +0300
committerGitHub <noreply@github.com>2017-10-06 10:14:24 +0300
commit184e84f947cf4e4abb9ff087e279980535e5b6c6 (patch)
treee4de94a6f58c5068fba13a478d48582d53e5aaf4 /misc
parentd1e2f0f405416f4d4db50a892442f7190fdd74e9 (diff)
Set the piwik domain before initialising environment (#12159)
so the correct config will be used
Diffstat (limited to 'misc')
-rw-r--r--misc/cron/updatetoken.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/misc/cron/updatetoken.php b/misc/cron/updatetoken.php
index c06684e4a3..71f2ba03c3 100644
--- a/misc/cron/updatetoken.php
+++ b/misc/cron/updatetoken.php
@@ -51,14 +51,15 @@ function getPiwikDomain()
return null;
}
-$environment = new Environment('cli');
-$environment->init();
$piwikDomain = getPiwikDomain();
if($piwikDomain) {
Url::setHost($piwikDomain);
}
+$environment = new Environment('cli');
+$environment->init();
+
$token = Db::get()->fetchOne("SELECT token_auth
FROM " . Common::prefixTable("user") . "
WHERE superuser_access = 1