diff options
Diffstat (limited to 'plugins/CorePluginsAdmin/MarketplaceApiClient.php')
-rw-r--r-- | plugins/CorePluginsAdmin/MarketplaceApiClient.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/CorePluginsAdmin/MarketplaceApiClient.php b/plugins/CorePluginsAdmin/MarketplaceApiClient.php index 0423f72600..61246f395d 100644 --- a/plugins/CorePluginsAdmin/MarketplaceApiClient.php +++ b/plugins/CorePluginsAdmin/MarketplaceApiClient.php @@ -125,6 +125,9 @@ class MarketplaceApiClient private function fetch($action, $params) { + $params['php'] = phpversion(); + $params['piwik'] = Version::VERSION; + $params['prefer_stable'] = '1'; ksort($params); $query = http_build_query($params); @@ -133,7 +136,7 @@ class MarketplaceApiClient $result = $cache->fetch($cacheId); if (false === $result) { - $endpoint = $this->domain . '/api/1.0/'; + $endpoint = $this->domain . '/api/2.0/'; $url = sprintf('%s%s?%s', $endpoint, $action, $query); $response = Http::sendHttpRequest($url, static::HTTP_REQUEST_TIMEOUT); $result = json_decode($response, true); @@ -161,7 +164,7 @@ class MarketplaceApiClient private function getCacheKey($action, $query) { - return sprintf('marketplace.api.1.0.%s.%s', str_replace('/', '.', $action), md5($query)); + return sprintf('marketplace.api.2.0.%s.%s', str_replace('/', '.', $action), md5($query)); } /** |