Merge branch 'develop' of github.com:friendica/friendica into rhaeder-develop

Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2016-03-04 20:05:15 +01:00
commit cc4349777a
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
2 changed files with 9 additions and 6 deletions

View file

@ -1691,13 +1691,13 @@
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
`contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
FROM `item`, `contact` FROM `item` FORCE INDEX (`uid_id`), `contact`
WHERE `item`.`uid` = %d AND `verb` = '%s' WHERE `item`.`uid` = %d AND `verb` = '%s'
AND NOT (`item`.`author-link` IN ('https://%s', 'http://%s')) AND NOT (`item`.`author-link` IN ('https://%s', 'http://%s'))
AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0 AND `item`.`visible` AND NOT `item`.`moderated` AND NOT `item`.`deleted`
AND `contact`.`id` = `item`.`contact-id` AND `contact`.`id` = `item`.`contact-id`
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND NOT `contact`.`blocked` AND NOT `contact`.`pending`
AND `item`.`parent` IN (SELECT `iid` from thread where uid = %d AND `mention` AND !`ignored`) AND `item`.`parent` IN (SELECT `iid` FROM `thread` WHERE `uid` = %d AND `mention` AND !`ignored`)
$sql_extra $sql_extra
AND `item`.`id`>%d AND `item`.`id`>%d
ORDER BY `item`.`id` DESC LIMIT %d ,%d ", ORDER BY `item`.`id` DESC LIMIT %d ,%d ",

View file

@ -283,14 +283,14 @@ function admin_page_federation(&$a) {
// get a total count for the platform, the name and version of the // get a total count for the platform, the name and version of the
// highest version and the protocol tpe // highest version and the protocol tpe
$c = q('SELECT count(*) AS total, platform, network, version FROM gserver $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); ORDER BY version ASC;', $p);
$total = $total + $c[0]['total']; $total = $total + $c[0]['total'];
// what versions for that platform do we know at all? // what versions for that platform do we know at all?
// again only the active nodes // again only the active nodes
$v = q('SELECT count(*) AS total, version FROM gserver $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 GROUP BY version
ORDER BY version;', $p); ORDER BY version;', $p);
@ -344,6 +344,9 @@ function admin_page_federation(&$a) {
$v = $newVv; $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 // 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...
$counts[$p]=array($c[0], $v, str_replace(array(' ','%'),'',$p), $colors[$p]); $counts[$p]=array($c[0], $v, str_replace(array(' ','%'),'',$p), $colors[$p]);