Merge pull request #19159 from nextcloud/stable17-backport/18786

[stable17] AppFetcher: Distinguish between fileName and endpointName
This commit is contained in:
Roeland Jago Douma 2020-01-28 11:51:42 +01:00 committed by GitHub
commit febae0c4f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1868 additions and 1782 deletions

View file

@ -66,6 +66,7 @@ class AppFetcher extends Fetcher {
);
$this->fileName = 'apps.json';
$this->endpointName = 'apps.json';
$this->compareVersion = $compareVersion;
$this->ignoreMaxVersion = true;
}

View file

@ -53,5 +53,6 @@ class CategoryFetcher extends Fetcher {
$logger
);
$this->fileName = 'categories.json';
$this->endpointName = 'categories.json';
}
}

View file

@ -54,6 +54,8 @@ abstract class Fetcher {
/** @var string */
protected $fileName;
/** @var string */
protected $endpointName;
/** @var string */
protected $version;
/** @var string */
protected $channel;
@ -218,6 +220,6 @@ abstract class Fetcher {
}
protected function getEndpoint(): string {
return $this->config->getSystemValue('appstoreurl', 'https://apps.nextcloud.com/api/v1') . '/' . $this->fileName;
return $this->config->getSystemValue('appstoreurl', 'https://apps.nextcloud.com/api/v1') . '/' . $this->endpointName;
}
}

File diff suppressed because one or more lines are too long