diff options
author | Matthieu Aubry <matt@piwik.org> | 2014-12-02 03:34:25 +0300 |
---|---|---|
committer | Matthieu Aubry <matt@piwik.org> | 2014-12-02 03:34:25 +0300 |
commit | a0d3bf94837642edafda458546497d703843854b (patch) | |
tree | ae558a78dc7488c3fc229889ac403ba757dce3e6 /misc/cron | |
parent | 03165a76526de6b537f64c5953e927b50a0ab18a (diff) | |
parent | 4a2145a1a7fd21cefb7d79e83f3416027c251c0a (diff) |
Merge pull request #6658 from piwik/tmp-path
Moved the `tmp/` path into the config (was hardcoded everywhere)
Diffstat (limited to 'misc/cron')
-rw-r--r-- | misc/cron/updatetoken.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/cron/updatetoken.php b/misc/cron/updatetoken.php index 4638f8bd27..37513b1a42 100644 --- a/misc/cron/updatetoken.php +++ b/misc/cron/updatetoken.php @@ -11,6 +11,8 @@ namespace Piwik; +use Piwik\Container\StaticContainer; + if (!defined('PIWIK_INCLUDE_PATH')) { define('PIWIK_INCLUDE_PATH', realpath(dirname(__FILE__) . "/../..")); } @@ -57,9 +59,7 @@ $token = Db::get()->fetchOne("SELECT token_auth WHERE superuser_access = 1 ORDER BY date_registered ASC"); -$filename = PIWIK_INCLUDE_PATH . '/tmp/cache/token.php'; - -$filename = SettingsPiwik::rewriteTmpPathWithInstanceId($filename); +$filename = StaticContainer::getContainer()->get('path.tmp') . '/cache/token.php'; $content = "<?php exit; //\t" . $token; file_put_contents($filename, $content); |