diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-11-09 11:10:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-09 11:10:33 +0100 |
commit | f02bab1425b9db105bfd4a8e37e56ac589ab971e (patch) | |
tree | 42cdabd892ec4ba9697e5ffcc483818b2a7ab255 /lib | |
parent | 28464f71a22623b6e4c542a58a124b4eb8527aad (diff) | |
parent | d8637c62e0b77cc597c9e11e4ea2bcbdd5c74646 (diff) | |
download | nextcloud-server-f02bab1425b9db105bfd4a8e37e56ac589ab971e.tar.gz nextcloud-server-f02bab1425b9db105bfd4a8e37e56ac589ab971e.zip |
Merge pull request #23976 from nextcloud/enh/reduce_getAppPath_and_autoload_reg
Reduce the getAppPath and autoloader calls
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/OC_App.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php index 941cd25397d..34d5d9ffe7c 100644 --- a/lib/private/legacy/OC_App.php +++ b/lib/private/legacy/OC_App.php @@ -118,9 +118,12 @@ class OC_App { // Add each apps' folder as allowed class path foreach ($apps as $app) { - $path = self::getAppPath($app); - if ($path !== false) { - self::registerAutoloading($app, $path); + // If the app is already loaded then autoloading it makes no sense + if (!isset(self::$loadedApps[$app])) { + $path = self::getAppPath($app); + if ($path !== false) { + self::registerAutoloading($app, $path); + } } } |