Merge pull request #47834 from nextcloud/retAppsManDis

This commit is contained in:
John Molakvoæ 2024-09-10 16:31:17 +02:00 committed by GitHub
commit 0858ff7a07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -148,10 +148,17 @@ class AppFetcher extends Fetcher {
$this->ignoreMaxVersion = $ignoreMaxVersion;
}
public function get($allowUnstable = false) {
public function get($allowUnstable = false): array {
$allowPreReleases = $allowUnstable || $this->getChannel() === 'beta' || $this->getChannel() === 'daily' || $this->getChannel() === 'git';
$appStoreEnabled = $this->config->getSystemValueBool('appstoreenabled', true);
$internetAvailable = $this->config->getSystemValueBool('has_internet_connection', true);
if (!$appStoreEnabled || !$internetAvailable) {
$this->logger->info('AppStore is disabled or this instance has no Internet connection', ['app' => 'appstoreFetcher']);
return [];
}
$apps = parent::get($allowPreReleases);
if (empty($apps)) {
$this->logger->warning('Could not get apps from the appstore', ['app' => 'appstoreFetcher']);