Skip to content

Commit

Permalink
fixed ExApp with one scope(llm2 for example) installation error
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
  • Loading branch information
bigcat88 committed Apr 17, 2024
1 parent bbb0490 commit 99d748d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/Service/ExAppService.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,11 @@ public function getAppInfo(string $appId, ?string $infoXml, ?string $jsonInfo):
}
$appInfo = json_decode(json_encode((array)$xmlAppInfo), true);
if (isset($appInfo['external-app']['scopes']['value'])) {
$appInfo['external-app']['scopes'] = $appInfo['external-app']['scopes']['value'];
if (is_array($appInfo['external-app']['scopes']['value'])) {
$appInfo['external-app']['scopes'] = $appInfo['external-app']['scopes']['value'];
} else {
$appInfo['external-app']['scopes'] = [$appInfo['external-app']['scopes']['value']];
}
}
if ($extractedDir) {
if (file_exists($extractedDir . '/l10n')) {
Expand All @@ -283,10 +287,6 @@ public function getAppInfo(string $appId, ?string $infoXml, ?string $jsonInfo):
$this->logger->info(sprintf('Application %s does not support translations', $appId));
}
}
# TO-DO: remove this in AppAPI 2.3.0
if (isset($appInfo['external-app']['scopes']['required']['value'])) {
$appInfo['external-app']['scopes'] = $appInfo['external-app']['scopes']['required']['value'];
}
}
return $appInfo;
}
Expand Down

0 comments on commit 99d748d

Please sign in to comment.