Only add valid root for enabled apps
This commit is contained in:
parent
7f8bca64cb
commit
b3acf09c60
|
@ -552,10 +552,6 @@ class OC {
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach(OC::$APPSROOTS as $appRoot) {
|
|
||||||
self::$loader->addValidRoot($appRoot['path']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// setup the basic server
|
// setup the basic server
|
||||||
self::$server = new \OC\Server(\OC::$WEBROOT);
|
self::$server = new \OC\Server(\OC::$WEBROOT);
|
||||||
\OC::$server->getEventLogger()->log('autoloader', 'Autoloader', $loaderStart, $loaderEnd);
|
\OC::$server->getEventLogger()->log('autoloader', 'Autoloader', $loaderStart, $loaderEnd);
|
||||||
|
|
|
@ -105,7 +105,6 @@ class OC_App {
|
||||||
ob_start();
|
ob_start();
|
||||||
foreach ($apps as $app) {
|
foreach ($apps as $app) {
|
||||||
if ((is_null($types) or self::isType($app, $types)) && !in_array($app, self::$loadedApps)) {
|
if ((is_null($types) or self::isType($app, $types)) && !in_array($app, self::$loadedApps)) {
|
||||||
self::$loadedApps[] = $app;
|
|
||||||
self::loadApp($app);
|
self::loadApp($app);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -122,6 +121,8 @@ class OC_App {
|
||||||
* @throws \OC\NeedsUpdateException
|
* @throws \OC\NeedsUpdateException
|
||||||
*/
|
*/
|
||||||
public static function loadApp($app, $checkUpgrade = true) {
|
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')) {
|
if (is_file(self::getAppPath($app) . '/appinfo/app.php')) {
|
||||||
\OC::$server->getEventLogger()->start('load_app_' . $app, 'Load app: ' . $app);
|
\OC::$server->getEventLogger()->start('load_app_' . $app, 'Load app: ' . $app);
|
||||||
if ($checkUpgrade and self::shouldUpgrade($app)) {
|
if ($checkUpgrade and self::shouldUpgrade($app)) {
|
||||||
|
|
Loading…
Reference in New Issue