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 <matt@piwik.org>2014-12-02 03:34:25 +0300
committerMatthieu Aubry <matt@piwik.org>2014-12-02 03:34:25 +0300
commita0d3bf94837642edafda458546497d703843854b (patch)
treeae558a78dc7488c3fc229889ac403ba757dce3e6 /misc
parent03165a76526de6b537f64c5953e927b50a0ab18a (diff)
parent4a2145a1a7fd21cefb7d79e83f3416027c251c0a (diff)
Merge pull request #6658 from piwik/tmp-path
Moved the `tmp/` path into the config (was hardcoded everywhere)
Diffstat (limited to 'misc')
-rw-r--r--misc/cron/updatetoken.php6
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);