Skip to content

Commit

Permalink
fix(appstore): return if appstore is manually disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
solracsf committed Sep 9, 2024
1 parent a2cfcf3 commit 7de6cb3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/private/App/AppStore/Fetcher/AppFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,17 @@ public function setVersion(string $version, string $fileName = 'apps.json', bool
$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']);
Expand Down

0 comments on commit 7de6cb3

Please sign in to comment.