aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/App/AppStore
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-03-06 19:59:15 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-03-20 15:16:11 +0100
commit769cb629aebd368fbddd6ea04067fdcfaa262e3e (patch)
tree432bfb3aca1d60128e79da57c2053bf7f19291a2 /lib/private/App/AppStore
parent1c8779dc6e34a89ea9181b3cb252101e457c1543 (diff)
downloadnextcloud-server-769cb629aebd368fbddd6ea04067fdcfaa262e3e.tar.gz
nextcloud-server-769cb629aebd368fbddd6ea04067fdcfaa262e3e.zip
allow enforcing apps to ignore the max version
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/App/AppStore')
-rw-r--r--lib/private/App/AppStore/Fetcher/AppFetcher.php18
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/private/App/AppStore/Fetcher/AppFetcher.php b/lib/private/App/AppStore/Fetcher/AppFetcher.php
index cf5839e4994..d8c505757c8 100644
--- a/lib/private/App/AppStore/Fetcher/AppFetcher.php
+++ b/lib/private/App/AppStore/Fetcher/AppFetcher.php
@@ -93,11 +93,8 @@ class AppFetcher extends Fetcher {
$version = $versionParser->getVersion($release['rawPlatformVersionSpec']);
$ncVersion = $this->getVersion();
$min = $version->getMinimumVersion();
- $max = $version->getMaximumVersion();
$minFulfilled = $this->compareVersion->isCompatible($ncVersion, $min, '>=');
- $maxFulfilled = $max !== '' &&
- $this->compareVersion->isCompatible($ncVersion, $max, '<=');
- if ($minFulfilled && $maxFulfilled) {
+ if ($minFulfilled) {
$releases[] = $release;
}
} catch (\InvalidArgumentException $e) {
@@ -113,20 +110,15 @@ class AppFetcher extends Fetcher {
}
usort($versions, 'version_compare');
$versions = array_reverse($versions);
- $compatible = false;
if(isset($versions[0])) {
$highestVersion = $versions[0];
foreach ($releases as $release) {
if ((string)$release['version'] === (string)$highestVersion) {
- $compatible = true;
$response['data'][$dataKey]['releases'] = [$release];
break;
}
}
}
- if(!$compatible) {
- unset($response['data'][$dataKey]);
- }
}
$response['data'] = array_values($response['data']);
@@ -134,13 +126,7 @@ class AppFetcher extends Fetcher {
}
private function setEndpoint() {
- $versionArray = explode('.', $this->getVersion());
- $this->endpointUrl = sprintf(
- 'https://apps.nextcloud.com/api/v1/platform/%d.%d.%d/apps.json',
- $versionArray[0],
- $versionArray[1],
- $versionArray[2]
- );
+ $this->endpointUrl = 'https://apps.nextcloud.com/api/v1/apps.json';
}
/**