Merge pull request #22133 from nextcloud/boot-app-once

only boot apps once
This commit is contained in:
Morris Jobke 2020-08-07 12:05:09 +02:00 committed by GitHub
commit 0807e29e17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -60,6 +60,9 @@ class Coordinator {
/** @var RegistrationContext|null */
private $registrationContext;
/** @var string[] */
private $bootedApps = [];
public function __construct(IServerContainer $container,
Registry $registry,
IManager $dashboardManager,
@ -134,6 +137,11 @@ class Coordinator {
}
public function bootApp(string $appId): void {
if (isset($this->bootedApps[$appId])) {
return;
}
$this->bootedApps[$appId] = true;
$appNameSpace = App::buildAppNamespace($appId);
$applicationClassName = $appNameSpace . '\\AppInfo\\Application';
if (!class_exists($applicationClassName)) {