aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-01-13 15:14:56 +0100
committerJoas Schilling <coding@schilljs.com>2020-01-13 15:15:50 +0100
commitdf9edf0108d1374b01c85ade946df85e880dfa9a (patch)
treea10dc1eb852726f094c7eddc56002ffdca5e114c
parentefcf246f0787d980b85d9cb89e1d15114774d4a5 (diff)
downloadnextcloud-server-df9edf0108d1374b01c85ade946df85e880dfa9a.tar.gz
nextcloud-server-df9edf0108d1374b01c85ade946df85e880dfa9a.zip
Allow to force register the namespace
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--lib/private/legacy/app.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index 16890fe7435..961e51fe736 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -227,10 +227,11 @@ class OC_App {
* @internal
* @param string $app
* @param string $path
+ * @param bool $force
*/
- public static function registerAutoloading(string $app, string $path) {
+ public static function registerAutoloading(string $app, string $path, bool $force = false) {
$key = $app . '-' . $path;
- if(isset(self::$alreadyRegistered[$key])) {
+ if (!$force && isset(self::$alreadyRegistered[$key])) {
return;
}
@@ -904,7 +905,7 @@ class OC_App {
\OC::$server->getAppManager()->clearAppsCache();
$appData = self::getAppInfo($appId);
- self::registerAutoloading($appId, $appPath);
+ self::registerAutoloading($appId, $appPath, true);
self::executeRepairSteps($appId, $appData['repair-steps']['pre-migration']);
if (file_exists($appPath . '/appinfo/database.xml')) {