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 /core/bootstrap.php | |
parent | b4af652dd9284f5565ba658389840a47dac48211 (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.php | 13 |
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() { |