aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/App
diff options
context:
space:
mode:
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>2024-09-09 09:29:09 +0200
committerGit'Fellow <12234510+solracsf@users.noreply.github.com>2024-09-09 09:56:22 +0200
commit2ac8d9a3db5f2515a95fa46a0e354d70012a2a56 (patch)
treeec8c249f9216c072fdd53e09aed813a996622893 /lib/private/App
parenta2cfcf3ca71cf748d8507f8ac490df89405b2a68 (diff)
downloadnextcloud-server-2ac8d9a3db5f2515a95fa46a0e354d70012a2a56.tar.gz
nextcloud-server-2ac8d9a3db5f2515a95fa46a0e354d70012a2a56.zip
fix(appstore): return if appstore is manually disabled
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: camel case Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: log a debug log Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: typing Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: typo fix: typing
Diffstat (limited to 'lib/private/App')
-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..412de722a12 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->debug('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']);