From: Michael Vogel Date: Tue, 1 Mar 2016 18:14:45 +0000 (+0100) Subject: Small bugfix: Fixes problen when version number contains linebreaks X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ce5f6fae51ac6c246bb0371798994bef7e589d42;p=friendica.git Small bugfix: Fixes problen when version number contains linebreaks --- diff --git a/mod/admin.php b/mod/admin.php index 7a16820c44..a98f464f81 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -283,14 +283,14 @@ 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 = q('SELECT count(*) AS total, platform, network, version FROM gserver - WHERE platform LIKE "%s" AND last_contact > last_failure + WHERE platform LIKE "%s" AND last_contact > last_failure AND `version` != "" 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 = q('SELECT count(*) AS total, version FROM gserver - WHERE last_contact > last_failure AND platform LIKE "%s" + WHERE last_contact > last_failure AND platform LIKE "%s" AND `version` != "" GROUP BY version ORDER BY version;', $p); @@ -344,6 +344,9 @@ function admin_page_federation(&$a) { $v = $newVv; } + foreach ($v as $key => $vv) + $v[$key]["version"] = trim(strip_tags($vv["version"])); + // the 3rd array item is needed for the JavaScript graphs as JS does // not like some characters in the names of variables... $counts[$p]=array($c[0], $v, str_replace(array(' ','%'),'',$p), $colors[$p]);