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>
  • Loading branch information
solracsf committed Sep 9, 2024
1 parent a2cfcf3 commit deb3617
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);
$isDefaultAppStore = $this->config->getSystemValueString('appstoreurl', self::APP_STORE_URL) === self::APP_STORE_URL;

if (!$appStoreEnabled || (!$internetAvailable && $isDefaultAppStore)) {
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 deb3617

Please sign in to comment.