mirror of
https://github.com/friendica/friendica
synced 2024-11-18 17:43:41 +00:00
Backport updated Pleroma version number handling
This commit is contained in:
parent
db5b66e6f1
commit
3d64ac603e
1 changed files with 2 additions and 2 deletions
|
@ -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'];
|
||||
|
|
Loading…
Reference in a new issue