// Reformat and compact version numbers\r
if ($platform == 'Pleroma') {\r
$compacted = [];\r
-\r
foreach ($versionCounts as $key => $value) {\r
$version = $versionCounts[$key]['version'];\r
$parts = explode(' ', trim($version));\r
do {\r
$part = array_pop($parts);\r
} while (!empty($parts) && ((strlen($part) >= 40) || (strlen($part) <= 3)));\r
-\r
+ // only take the x.x.x part of the version, not the "release" after the dash\r
+ $part = array_shift(explode('-', $part));\r
if (!empty($part)) {\r
if (empty($compacted[$part])) {\r
$compacted[$part] = $versionCounts[$key]['total'];\r