diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2019-09-17 23:35:22 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2019-09-17 23:35:22 +0300 |
commit | 42b4ab13bc36511fabbf376e098e07ffae0d674a (patch) | |
tree | 1deef1ec16dca25b3a41cd200d5a481f7803e157 /misc | |
parent | 583d8d1c28cf0b96810a81dfb7c76a3c1140d764 (diff) |
Fix user path was not working as it should (allow placing config file outside webroot) (#14866)
* Fix user path was not working as it should
* fix error
Diffstat (limited to 'misc')
-rw-r--r-- | misc/cron/updatetoken.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/misc/cron/updatetoken.php b/misc/cron/updatetoken.php index d55921badd..b10a21d347 100644 --- a/misc/cron/updatetoken.php +++ b/misc/cron/updatetoken.php @@ -15,19 +15,15 @@ use Piwik\Application\Environment; use Piwik\Tests\Framework\TestingEnvironmentManipulator; use Piwik\Tests\Framework\TestingEnvironmentVariables; -if (!defined('PIWIK_INCLUDE_PATH')) { - define('PIWIK_INCLUDE_PATH', realpath(dirname(__FILE__) . "/../..")); -} - -if (!defined('PIWIK_USER_PATH')) { - define('PIWIK_USER_PATH', PIWIK_INCLUDE_PATH); +if (!defined('PIWIK_DOCUMENT_ROOT')) { + define('PIWIK_DOCUMENT_ROOT', realpath(dirname(__FILE__) . "/../..")); } define('PIWIK_ENABLE_DISPATCH', false); define('PIWIK_ENABLE_ERROR_HANDLER', false); define('PIWIK_ENABLE_SESSION_START', false); -require_once PIWIK_INCLUDE_PATH . "/index.php"; +require_once PIWIK_DOCUMENT_ROOT . "/index.php"; if (!Common::isPhpCliMode()) { return; |