aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-09-15 22:10:02 +0200
committerGitHub <noreply@github.com>2024-09-15 22:10:02 +0200
commit474a323da6c6f003f477a3e36f02f4b8c46efc85 (patch)
treefaddae9bbaae28d32f0436e23f460fefcc9d8e0d /lib/private
parent6bc75b85f1bf5839a7dc85321d9ddb22dd3c1086 (diff)
parente0a6572e3cdf14c8700d0efe93ad52b242ed0e08 (diff)
downloadnextcloud-server-474a323da6c6f003f477a3e36f02f4b8c46efc85.tar.gz
nextcloud-server-474a323da6c6f003f477a3e36f02f4b8c46efc85.zip
Merge pull request #47872 from nextcloud/backport/47834/stable30
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/App/AppStore/Fetcher/AppFetcher.php11
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']);