mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Merge pull request #47834 from nextcloud/retAppsManDis
This commit is contained in:
commit
0858ff7a07
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->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']);
|
||||
|
|
|
|||
Loading…
Reference in a new issue