diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-10-28 10:13:02 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-10-31 17:17:45 +0100 |
commit | 067fb18670d2b81adf6209ce1ca9feb357c8bcf0 (patch) | |
tree | 7e4f02ec72c888392d983dfda9b555f088128cc7 | |
parent | ca7f6dec556c93f2d68ed02d40a64059327a9fef (diff) | |
download | nextcloud-server-067fb18670d2b81adf6209ce1ca9feb357c8bcf0.tar.gz nextcloud-server-067fb18670d2b81adf6209ce1ca9feb357c8bcf0.zip |
Read array elements instead of substr
Otherwise this would break with 11.0.0
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
-rw-r--r-- | lib/private/App/AppStore/Fetcher/AppFetcher.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/App/AppStore/Fetcher/AppFetcher.php b/lib/private/App/AppStore/Fetcher/AppFetcher.php index 2a39b047a5a..e7d600471d1 100644 --- a/lib/private/App/AppStore/Fetcher/AppFetcher.php +++ b/lib/private/App/AppStore/Fetcher/AppFetcher.php @@ -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] ); } } |