shorter foreach loop
This commit is contained in:
parent
772d33342c
commit
df3c776e1b
1 changed files with 3 additions and 7 deletions
|
@ -301,15 +301,11 @@ function admin_page_federation(&$a) {
|
||||||
//
|
//
|
||||||
// some platforms do not provide version information, add a unkown there
|
// some platforms do not provide version information, add a unkown there
|
||||||
// to the version string for the displayed list.
|
// to the version string for the displayed list.
|
||||||
$newV = array();
|
foreach ($v as $key => $value) {
|
||||||
foreach ($v as $vv) {
|
if ($v[$key]['version'] == '') {
|
||||||
if ($vv['version'] == '') {
|
$v[$key] = array('total'=>$v[$key]['total'], 'version'=>t('unknown'));
|
||||||
$newV[] = array('total'=>$vv['total'], 'version'=>t('unknown'));
|
|
||||||
} else {
|
|
||||||
$newV[] = $vv;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$v = $newV;
|
|
||||||
// in the DB the Diaspora versions have the format x.x.x.x-xx the last
|
// in the DB the Diaspora versions have the format x.x.x.x-xx the last
|
||||||
// part (-xx) should be removed to clean up the versions from the "head
|
// part (-xx) should be removed to clean up the versions from the "head
|
||||||
// commit" information and combined into a single entry for x.x.x.x
|
// commit" information and combined into a single entry for x.x.x.x
|
||||||
|
|
Loading…
Reference in a new issue