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
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 /core/bootstrap.php
parentb4af652dd9284f5565ba658389840a47dac48211 (diff)
Removed Piwik\Loader: Composer's autoloader is now included in core/bootstrap.php
Diffstat (limited to 'core/bootstrap.php')
-rw-r--r--core/bootstrap.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/core/bootstrap.php b/core/bootstrap.php
index 546625b8c6..d6e809df20 100644
--- a/core/bootstrap.php
+++ b/core/bootstrap.php
@@ -22,12 +22,21 @@ disableEaccelerator();
require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php';
+// 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_once $path;
+
/**
- * See https://github.com/piwik/piwik/issues/4439#comment:8 and https://github.com/eaccelerator/eaccelerator/issues/12
- *
* Eaccelerator does not support closures and is known to be not comptabile with Piwik. Therefore we are disabling
* it automatically. At this point it looks like Eaccelerator is no longer under development and the bug has not
* been fixed within a year.
+ *
+ * @link https://github.com/piwik/piwik/issues/4439#comment:8
+ * @link https://github.com/eaccelerator/eaccelerator/issues/12
*/
function disableEaccelerator()
{