summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/App/AppStore/Fetcher/AppFetcher.php2
-rw-r--r--tests/lib/App/AppStore/Fetcher/AppFetcherTest.php11
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/private/App/AppStore/Fetcher/AppFetcher.php b/lib/private/App/AppStore/Fetcher/AppFetcher.php
index bbe75c723d5..b8efdef4336 100644
--- a/lib/private/App/AppStore/Fetcher/AppFetcher.php
+++ b/lib/private/App/AppStore/Fetcher/AppFetcher.php
@@ -50,7 +50,7 @@ class AppFetcher extends Fetcher {
$this->fileName = 'apps.json';
$this->config = $config;
- $versionArray = \OC_Util::getVersion();
+ $versionArray = explode('.', $this->config->getSystemValue('version'));
$this->endpointUrl = sprintf(
'https://apps.nextcloud.com/api/v1/platform/%d.%d.%d/apps.json',
$versionArray[0],
diff --git a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
index aa0d50cac97..a9cd5a190d0 100644
--- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
+++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
@@ -58,6 +58,12 @@ EOD;
$this->timeFactory = $this->createMock(ITimeFactory::class);
$this->config = $this->createMock(IConfig::class);
+ $this->config
+ ->expects($this->atLeastOnce())
+ ->method('getSystemValue')
+ ->with('version')
+ ->willReturn('11.0.0.2');
+
$this->fetcher = new AppFetcher(
$this->appData,
$this->clientService,
@@ -103,11 +109,6 @@ EOD;
->expects($this->once())
->method('getTime')
->willReturn(1234);
- $this->config
- ->expects($this->once())
- ->method('getSystemValue')
- ->with('version')
- ->willReturn('11.0.0.2');
$expected = array (
'data' =>