From df3c776e1b73e5d3b3dddf7b2419762a63f1db2e Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 13 Nov 2016 09:03:22 +0100 Subject: [PATCH] shorter foreach loop --- mod/admin.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index 4dbdc377f4..9eb86720df 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -301,15 +301,11 @@ function admin_page_federation(&$a) { // // some platforms do not provide version information, add a unkown there // to the version string for the displayed list. - $newV = array(); - foreach ($v as $vv) { - if ($vv['version'] == '') { - $newV[] = array('total'=>$vv['total'], 'version'=>t('unknown')); - } else { - $newV[] = $vv; + foreach ($v as $key => $value) { + if ($v[$key]['version'] == '') { + $v[$key] = array('total'=>$v[$key]['total'], 'version'=>t('unknown')); } } - $v = $newV; // 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 // commit" information and combined into a single entry for x.x.x.x -- 2.39.5