]> git.mxchange.org Git - friendica.git/commitdiff
Backport updated Pleroma version number handling
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 26 Apr 2019 13:11:58 +0000 (09:11 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 2 May 2019 13:52:54 +0000 (09:52 -0400)
src/Module/Admin/Federation.php

index 3d697a7fda65f6ad94677bce48eb19847473cf2f..7a1c09db688047c019c4487d55fdf5e0ac9d7f87 100644 (file)
@@ -84,14 +84,14 @@ class Federation extends BaseAdminModule
                        // 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