From 12dd65786879d5288e85314ba456c928284791b9 Mon Sep 17 00:00:00 2001 From: Jens Tautenhahn Date: Wed, 9 Nov 2016 21:32:15 +0100 Subject: [PATCH 1/3] fixes an sql error in NotificationsManager --- include/NotificationsManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/NotificationsManager.php b/include/NotificationsManager.php index 3b7cbdfc9..e5e9e9625 100644 --- a/include/NotificationsManager.php +++ b/include/NotificationsManager.php @@ -554,7 +554,7 @@ class NotificationsManager { $r = q("SELECT `item`.`id`,`item`.`parent`, `item`.`verb`, `item`.`author-name`, `item`.`unseen`, `item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object` AS `object`, - `pitem`.`author-name` AS `pname`, `pitem`.`author-link` AS `plink`, `pitem`.`guid` AS `pguid`, + `pitem`.`author-name` AS `pname`, `pitem`.`author-link` AS `plink`, `pitem`.`guid` AS `pguid` FROM `item` INNER JOIN `item` AS `pitem` ON `pitem`.`id`=`item`.`parent` WHERE `item`.`visible` = 1 $sql_extra From 7b5c5c0fa234852b7bc01621e1c9be5e1b5f92e1 Mon Sep 17 00:00:00 2001 From: Jens Tautenhahn Date: Wed, 9 Nov 2016 21:48:36 +0100 Subject: [PATCH 2/3] count only version numbers starting with "numbers / dot or dash / numbers" in federation statistics --- mod/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/admin.php b/mod/admin.php index 287eff272..0e9032cf3 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -290,7 +290,7 @@ function admin_page_federation(&$a) { // 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" AND `version` RLIKE "^[[:digit:]]+[-.][[:digit:]]+" GROUP BY `version` ORDER BY `version`;', $p); From d92c9a444f42dc5bc74ca4f827369ae5a6257cf7 Mon Sep 17 00:00:00 2001 From: Jens Tautenhahn Date: Mon, 14 Nov 2016 09:48:19 +0100 Subject: [PATCH 3/3] Revert "count only version numbers starting with "numbers / dot or dash / numbers" in federation statistics" This reverts commit 7b5c5c0fa234852b7bc01621e1c9be5e1b5f92e1. --- mod/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/admin.php b/mod/admin.php index 0e9032cf3..287eff272 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -290,7 +290,7 @@ function admin_page_federation(&$a) { // 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` RLIKE "^[[:digit:]]+[-.][[:digit:]]+" + WHERE `last_contact` > `last_failure` AND `platform` LIKE "%s" AND `version` != "" GROUP BY `version` ORDER BY `version`;', $p);