summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2015-09-04 22:11:45 +0100
committerRobin McCorkell <rmccorkell@owncloud.com>2015-09-05 00:04:58 +0100
commitb3acf09c60f6d4c9ea4583a65e9a14d597ee91e4 (patch)
treef5de1cf8d5eeaf96b0532c83f3e590decf0d8fe2
parent7f8bca64cbb32df8eca313a886fd21e54fc24f13 (diff)
downloadnextcloud-server-b3acf09c60f6d4c9ea4583a65e9a14d597ee91e4.tar.gz
nextcloud-server-b3acf09c60f6d4c9ea4583a65e9a14d597ee91e4.zip
Only add valid root for enabled apps
-rw-r--r--lib/base.php4
-rw-r--r--lib/private/app.php3
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/base.php b/lib/base.php
index 63aad4518ab..a4b5e9e01bf 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -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);
diff --git a/lib/private/app.php b/lib/private/app.php
index f1a1d27ae66..f6a81f9945f 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -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)) {