diff --git a/piwik.php b/piwik.php index 4563dddffe4..4346bfb1856 100644 --- a/piwik.php +++ b/piwik.php @@ -15,7 +15,10 @@ $GLOBALS['PIWIK_TRACKER_DEBUG_FORCE_SCHEDULED_TASKS'] = false; define('PIWIK_ENABLE_TRACKING', true); -define('PIWIK_DOCUMENT_ROOT', dirname(__FILE__) == '/' ? '' : dirname(__FILE__)); +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'; }