]> git.mxchange.org Git - friendica.git/blobdiff - mod/admin.php
Removed commented code
[friendica.git] / mod / admin.php
index b9c714f3773d531d1f4aca9ffa410395d842d11b..9eb86720dfd04c779914498689a01778429c9640 100644 (file)
@@ -285,20 +285,27 @@ function admin_page_federation(&$a) {
                // get a total count for the platform, the name and version of the
                // highest version and the protocol tpe
                $c = qu('SELECT COUNT(*) AS `total`, `platform`, `network`, `version` FROM `gserver`
-                               WHERE `platform` LIKE "%s" AND `last_contact` > `last_failure` AND `version` != ""
+                               WHERE `platform` LIKE "%s" AND `last_contact` > `last_failure`
                                ORDER BY `version` ASC;', $p);
                $total = $total + $c[0]['total'];
 
                // what versions for that platform do we know at all?
                // again only the active nodes
                $v = qu('SELECT COUNT(*) AS `total`, `version` FROM `gserver`
-                               WHERE `last_contact` > `last_failure` AND `platform` LIKE "%s"  AND `version` != ""
+                               WHERE `last_contact` > `last_failure` AND `platform` LIKE "%s"
                                GROUP BY `version`
                                ORDER BY `version`;', $p);
 
                //
                // clean up version numbers
                //
+               // some platforms do not provide version information, add a unkown there
+               // to the version string for the displayed list.
+               foreach ($v as $key => $value) {
+                       if ($v[$key]['version'] == '') {
+                               $v[$key] = array('total'=>$v[$key]['total'], 'version'=>t('unknown'));
+                       }
+               }
                // 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