Merge pull request #18862 from nextcloud/bugfix/talk-2663/register-with-potentially-updated-namespace

Register with potentially updated namespace
This commit is contained in:
Roeland Jago Douma 2020-01-14 08:37:09 +01:00 committed by GitHub
commit bda67669bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 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;
}
@ -900,10 +901,11 @@ class OC_App {
if($appPath === false) {
return false;
}
self::registerAutoloading($appId, $appPath);
\OC::$server->getAppManager()->clearAppsCache();
$appData = self::getAppInfo($appId);
self::registerAutoloading($appId, $appPath, true);
self::executeRepairSteps($appId, $appData['repair-steps']['pre-migration']);
if (file_exists($appPath . '/appinfo/database.xml')) {