Allow to force register the namespace

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2020-01-13 15:14:56 +01:00
parent efcf246f07
commit df9edf0108
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 4 additions and 3 deletions

View File

@ -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')) {