Skip to content

Commit

Permalink
Merge pull request #48127 from nextcloud/backport/48114/stable30
Browse files Browse the repository at this point in the history
[stable30] fix(appstoreFetcher): get list from a custom store and remove unnecessary warning
  • Loading branch information
ShGKme committed Sep 23, 2024
2 parents 6044c9f + 3ee3542 commit 8b56189
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
9 changes: 0 additions & 9 deletions lib/private/App/AppStore/Fetcher/AppFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,8 @@ public function setVersion(string $version, string $fileName = 'apps.json', bool
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']);
return [];
}
$allowList = $this->config->getSystemValue('appsallowlist');
Expand Down
1 change: 1 addition & 0 deletions lib/private/App/AppStore/Fetcher/Fetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public function get($allowUnstable = false) {
$isDefaultAppStore = $this->config->getSystemValueString('appstoreurl', self::APP_STORE_URL) === self::APP_STORE_URL;

if (!$appstoreenabled || (!$internetavailable && $isDefaultAppStore)) {
$this->logger->info('AppStore is disabled or this instance has no Internet connection to access the default app store', ['app' => 'appstoreFetcher']);
return [];
}

Expand Down

0 comments on commit 8b56189

Please sign in to comment.