Fix the version sorting in the federation statistics
This commit is contained in:
parent
4724c7de72
commit
3eb7ab2d9e
1 changed files with 15 additions and 2 deletions
|
@ -635,8 +635,21 @@ function admin_page_federation(App $a)
|
||||||
$v = $newVv;
|
$v = $newVv;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($v as $key => $vv)
|
// Assure that the versions are sorted correctly
|
||||||
$v[$key]["version"] = trim(strip_tags($vv["version"]));
|
$v2 = [];
|
||||||
|
$versions = [];
|
||||||
|
foreach ($v as $vv) {
|
||||||
|
$version = trim(strip_tags($vv["version"]));
|
||||||
|
$v2[$version] = $vv;
|
||||||
|
$versions[] = $version;
|
||||||
|
}
|
||||||
|
|
||||||
|
usort($versions, 'version_compare');
|
||||||
|
|
||||||
|
$v = [];
|
||||||
|
foreach ($versions as $version) {
|
||||||
|
$v[] = $v2[$version];
|
||||||
|
}
|
||||||
|
|
||||||
// the 3rd array item is needed for the JavaScript graphs as JS does
|
// the 3rd array item is needed for the JavaScript graphs as JS does
|
||||||
// not like some characters in the names of variables...
|
// not like some characters in the names of variables...
|
||||||
|
|
Loading…
Reference in a new issue