diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-12-22 03:02:10 +0300 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-12-22 05:36:47 +0300 |
commit | 939d1c1be832472204aa000f003d1eba20a1edbb (patch) | |
tree | 8c488726a5b07ac409ef306ca4ef0d64702d4315 | |
parent | 7efe85ef32abe0695377fd5131299bf7079a6c88 (diff) |
The console now includes the optional file bootstrap.php
Users can add a custom `bootstrap.php` file at the root of Piwik to customize constants. This file is included (if exists) in `index.php` and `piwik.php` but not in the console. This is now fixed.
See the user docs about this: http://piwik.org/docs/include-piwik-in-your-project/
-rwxr-xr-x | console | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -3,6 +3,11 @@ if (!defined('PIWIK_DOCUMENT_ROOT')) { define('PIWIK_DOCUMENT_ROOT', dirname(__FILE__) == '/' ? '' : dirname(__FILE__)); } + +if (file_exists(PIWIK_DOCUMENT_ROOT . '/bootstrap.php')) { + require_once PIWIK_DOCUMENT_ROOT . '/bootstrap.php'; +} + if (!defined('PIWIK_INCLUDE_PATH')) { define('PIWIK_INCLUDE_PATH', PIWIK_DOCUMENT_ROOT); } |