Only add valid root for enabled apps

This commit is contained in:
Robin McCorkell 2015-09-04 22:11:45 +01:00
parent 7f8bca64cb
commit b3acf09c60
2 changed files with 2 additions and 5 deletions

View File

@ -552,10 +552,6 @@ class OC {
exit();
}
foreach(OC::$APPSROOTS as $appRoot) {
self::$loader->addValidRoot($appRoot['path']);
}
// setup the basic server
self::$server = new \OC\Server(\OC::$WEBROOT);
\OC::$server->getEventLogger()->log('autoloader', 'Autoloader', $loaderStart, $loaderEnd);

View File

@ -105,7 +105,6 @@ class OC_App {
ob_start();
foreach ($apps as $app) {
if ((is_null($types) or self::isType($app, $types)) && !in_array($app, self::$loadedApps)) {
self::$loadedApps[] = $app;
self::loadApp($app);
}
}
@ -122,6 +121,8 @@ class OC_App {
* @throws \OC\NeedsUpdateException
*/
public static function loadApp($app, $checkUpgrade = true) {
self::$loadedApps[] = $app;
\OC::$loader->addValidRoot(self::getAppPath($app));
if (is_file(self::getAppPath($app) . '/appinfo/app.php')) {
\OC::$server->getEventLogger()->start('load_app_' . $app, 'Load app: ' . $app);
if ($checkUpgrade and self::shouldUpgrade($app)) {