Skip to content

Commit

Permalink
Merge branch 'main' into occ-commands
Browse files Browse the repository at this point in the history
  • Loading branch information
bigcat88 authored Apr 17, 2024
2 parents 74a5d22 + e391299 commit c1cc5b0
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 @@ -278,7 +278,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 @@ -287,10 +291,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 c1cc5b0

Please sign in to comment.