diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-12-22 06:32:06 +0300 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-12-22 06:32:06 +0300 |
commit | f172b5924d52cbfda53e7ce23db0bb58da6db0f3 (patch) | |
tree | bf8a8224de5573998693519ab986f2ca3c40a2ef /js | |
parent | b4af652dd9284f5565ba658389840a47dac48211 (diff) |
Removed Piwik\Loader: Composer's autoloader is now included in core/bootstrap.php
Diffstat (limited to 'js')
-rw-r--r-- | js/tracker.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/js/tracker.php b/js/tracker.php index ac85498cb9..b3191f9c49 100644 --- a/js/tracker.php +++ b/js/tracker.php @@ -27,8 +27,14 @@ define('PIWIK_DOCUMENT_ROOT', '..'); define('PIWIK_USER_PATH', '..'); require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php'; -require_once PIWIK_INCLUDE_PATH . '/core/Loader.php'; -\Piwik\Loader::init(); + +// Composer autoloader +if (file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php')) { + $path = PIWIK_INCLUDE_PATH . '/vendor/autoload.php'; // Piwik is the main project +} else { + $path = PIWIK_INCLUDE_PATH . '/../../autoload.php'; // Piwik is installed as a dependency +} +require $path; $file = '../piwik.js'; |