diff options
author | Matthieu Aubry <mattab@users.noreply.github.com> | 2017-10-06 10:14:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-06 10:14:24 +0300 |
commit | 184e84f947cf4e4abb9ff087e279980535e5b6c6 (patch) | |
tree | e4de94a6f58c5068fba13a478d48582d53e5aaf4 /misc | |
parent | d1e2f0f405416f4d4db50a892442f7190fdd74e9 (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.php | 5 |
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 |