]> source.dussan.org Git - nextcloud-server.git/commitdiff
Read array elements instead of substr
authorLukas Reschke <lukas@statuscode.ch>
Fri, 28 Oct 2016 08:13:02 +0000 (10:13 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Mon, 31 Oct 2016 16:17:45 +0000 (17:17 +0100)
Otherwise this would break with 11.0.0

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
lib/private/App/AppStore/Fetcher/AppFetcher.php

index 2a39b047a5a587ef7e5bc679e360757e7d89c210..e7d600471d17256de9ab0ef9ef6f3db73b0a3f9b 100644 (file)
@@ -44,9 +44,13 @@ class AppFetcher extends Fetcher {
                );
 
                $this->fileName = 'apps.json';
+
+               $versionArray = \OC_Util::getVersion();
                $this->endpointUrl = sprintf(
-                       'https://apps.nextcloud.com/api/v1/platform/%s/apps.json',
-                       substr(implode(\OC_Util::getVersion(), '.'), 0, 5)
+                       'https://apps.nextcloud.com/api/v1/platform/%s.%s.%s/apps.json',
+                       $versionArray[0],
+                       $versionArray[1],
+                       $versionArray[2]
                );
        }
 }