From 3d64ac603e635e1650484338dd72084c5bb83f6b Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 26 Apr 2019 09:11:58 -0400 Subject: [PATCH] Backport updated Pleroma version number handling --- src/Module/Admin/Federation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Module/Admin/Federation.php b/src/Module/Admin/Federation.php index 3d697a7fd..7a1c09db6 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'];