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/js
diff options
context:
space:
mode:
authorMatthieu Napoli <matthieu@mnapoli.fr>2014-12-22 06:32:06 +0300
committerMatthieu Napoli <matthieu@mnapoli.fr>2014-12-22 06:32:06 +0300
commitf172b5924d52cbfda53e7ce23db0bb58da6db0f3 (patch)
treebf8a8224de5573998693519ab986f2ca3c40a2ef /js
parentb4af652dd9284f5565ba658389840a47dac48211 (diff)
Removed Piwik\Loader: Composer's autoloader is now included in core/bootstrap.php
Diffstat (limited to 'js')
-rw-r--r--js/tracker.php10
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';