mirror of
https://github.com/nextcloud/server.git
synced 2026-04-23 23:27:46 -04:00
Merge pull request #48127 from nextcloud/backport/48114/stable30
[stable30] fix(appstoreFetcher): get list from a custom store and remove unnecessary warning
This commit is contained in:
commit
8b56189f65
2 changed files with 1 additions and 9 deletions
|
|
@ -152,17 +152,8 @@ class AppFetcher extends Fetcher {
|
|||
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');
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ abstract class Fetcher {
|
|||
$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 [];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue