Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CorePluginsAdmin/MarketplaceApiClient.php')
-rw-r--r--plugins/CorePluginsAdmin/MarketplaceApiClient.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/CorePluginsAdmin/MarketplaceApiClient.php b/plugins/CorePluginsAdmin/MarketplaceApiClient.php
index 0423f72600..ee20abc918 100644
--- a/plugins/CorePluginsAdmin/MarketplaceApiClient.php
+++ b/plugins/CorePluginsAdmin/MarketplaceApiClient.php
@@ -9,6 +9,7 @@
namespace Piwik\Plugins\CorePluginsAdmin;
use Piwik\Cache;
+use Piwik\Container\StaticContainer;
use Piwik\Http;
use Piwik\Version;
@@ -123,9 +124,16 @@ class MarketplaceApiClient
return array();
}
+ public static function getPiwikVersion()
+ {
+ return StaticContainer::get('marketplacePiwikVersion');
+ }
+
private function fetch($action, $params)
{
ksort($params);
+ $params['piwik'] = self::getPiwikVersion();
+ $params['php'] = PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION . '.' . PHP_RELEASE_VERSION;
$query = http_build_query($params);
$cacheId = $this->getCacheKey($action, $query);
@@ -180,7 +188,7 @@ class MarketplaceApiClient
$latestVersion = array_pop($plugin['versions']);
$downloadUrl = $latestVersion['download'];
- return $this->domain . $downloadUrl . '?coreVersion=' . Version::VERSION;
+ return $this->domain . $downloadUrl . '?coreVersion=' . self::getPiwikVersion();
}
}