From: Hypolite Petovan Date: Fri, 26 Apr 2019 13:11:58 +0000 (-0400) Subject: Backport updated Pleroma version number handling X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3d64ac603e635e1650484338dd72084c5bb83f6b;p=friendica.git Backport updated Pleroma version number handling --- diff --git a/src/Module/Admin/Federation.php b/src/Module/Admin/Federation.php index 3d697a7fda..7a1c09db68 100644 --- a/src/Module/Admin/Federation.php +++ b/src/Module/Admin/Federation.php @@ -84,14 +84,14 @@ class Federation extends BaseAdminModule // Reformat and compact version numbers if ($platform == 'Pleroma') { $compacted = []; - foreach ($versionCounts as $key => $value) { $version = $versionCounts[$key]['version']; $parts = explode(' ', trim($version)); do { $part = array_pop($parts); } while (!empty($parts) && ((strlen($part) >= 40) || (strlen($part) <= 3))); - + // only take the x.x.x part of the version, not the "release" after the dash + $part = array_shift(explode('-', $part)); if (!empty($part)) { if (empty($compacted[$part])) { $compacted[$part] = $versionCounts[$key]['total'];