mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
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
This commit is contained in:
parent
5017d5000e
commit
993abfdbf1
1 changed files with 9 additions and 2 deletions
|
|
@ -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']);
|
||||
|
|
|
|||
Loading…
Reference in a new issue