diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-09-10 16:31:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-10 16:31:17 +0200 |
commit | 0858ff7a076b1535cecd7c1ec5140b4e2c2b4f47 (patch) | |
tree | 3bb8b2d0845fd44b449aea3f480803bd498c24ce /lib | |
parent | 12ea0eb24ab626cce10060c048c842d5c34f1b8e (diff) | |
parent | 4d3168fb24e21819129d17e69847c91331e2c3c0 (diff) | |
download | nextcloud-server-0858ff7a076b1535cecd7c1ec5140b4e2c2b4f47.tar.gz nextcloud-server-0858ff7a076b1535cecd7c1ec5140b4e2c2b4f47.zip |
Merge pull request #47834 from nextcloud/retAppsManDis
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/App/AppStore/Fetcher/AppFetcher.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/private/App/AppStore/Fetcher/AppFetcher.php b/lib/private/App/AppStore/Fetcher/AppFetcher.php index ae36d849c5e..676638f69df 100644 --- a/lib/private/App/AppStore/Fetcher/AppFetcher.php +++ b/lib/private/App/AppStore/Fetcher/AppFetcher.php @@ -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']); |