summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-09-15 13:24:35 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-09-15 13:24:35 +0200
commitb6fe5b6f3c5204b765600509b28478fdfea3997b (patch)
tree1ce6250b2290ab90e7c405a2a6780ca267dfa32e
parent1d315512eaec830008f9d9a500342fadef9595c1 (diff)
parent8e1b403b16e78a6e748144feacdac76db72c1130 (diff)
downloadnextcloud-server-b6fe5b6f3c5204b765600509b28478fdfea3997b.tar.gz
nextcloud-server-b6fe5b6f3c5204b765600509b28478fdfea3997b.zip
Merge pull request #19039 from owncloud/setup-autoloader-earlier
Define allowed app roots earlier
-rw-r--r--lib/private/app.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/app.php b/lib/private/app.php
index f6a81f9945f..e42fba525e4 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -101,6 +101,15 @@ class OC_App {
}
// Load the enabled apps here
$apps = self::getEnabledApps();
+
+ // Add each apps' folder as allowed class path
+ foreach($apps as $app) {
+ $path = self::getAppPath($app);
+ if($path !== false) {
+ \OC::$loader->addValidRoot($path);
+ }
+ }
+
// prevent app.php from printing output
ob_start();
foreach ($apps as $app) {
@@ -122,7 +131,6 @@ class OC_App {
*/
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)) {