require composer's autoload.php if present

This commit is contained in:
Thomas Müller 2014-01-05 21:49:08 +01:00
parent e2d739fa21
commit 214aecac78
1 changed files with 6 additions and 2 deletions

View File

@ -410,8 +410,6 @@ class OC {
self::$loader->registerPrefix('Doctrine\\DBAL', 'doctrine/dbal/lib');
self::$loader->registerPrefix('Symfony\\Component\\Routing', 'symfony/routing');
self::$loader->registerPrefix('Symfony\\Component\\Console', 'symfony/console');
self::$loader->registerPrefix('Sabre\\VObject', '3rdparty');
self::$loader->registerPrefix('Sabre_', '3rdparty');
self::$loader->registerPrefix('Patchwork', '3rdparty');
spl_autoload_register(array(self::$loader, 'load'));
@ -479,6 +477,12 @@ class OC {
}
OC_Util::isSetLocaleWorking();
// setup 3rdparty autoloader
$vendorAutoLoad = OC::$THIRDPARTYROOT . '/3rdparty/autoload.php';
if (@file_exists($vendorAutoLoad)) {
require_once $vendorAutoLoad;
}
// set debug mode if an xdebug session is active
if (!defined('DEBUG') || !DEBUG) {
if (isset($_COOKIE['XDEBUG_SESSION'])) {