]> git.mxchange.org Git - friendica.git/commitdiff
Only display federated servers
authorMichael <heluecht@pirati.ca>
Sun, 6 Feb 2022 05:58:37 +0000 (05:58 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 6 Feb 2022 05:58:37 +0000 (05:58 +0000)
src/Module/Admin/Federation.php

index 0e315c37cdb9a9484dfa668b85b5295805e2a7f4..1191961890e7fe12eb83549b4b85cbc96f39dc73 100644 (file)
@@ -21,6 +21,7 @@
 
 namespace Friendica\Module\Admin;
 
+use Friendica\Core\Protocol;
 use Friendica\Core\Renderer;
 use Friendica\Database\DBA;
 use Friendica\DI;
@@ -72,15 +73,15 @@ class Federation extends BaseAdmin
 
                $gservers = DBA::p("SELECT COUNT(*) AS `total`, SUM(`registered-users`) AS `users`, `platform`,
                        ANY_VALUE(`network`) AS `network`, MAX(`version`) AS `version`
-                       FROM `gserver` WHERE NOT `failed` AND `detection-method` != ? GROUP BY `platform`", GServer::DETECT_MANUAL);
+                       FROM `gserver` WHERE NOT `failed` AND `detection-method` != ? AND NOT `network` IN (?, ?) GROUP BY `platform`", GServer::DETECT_MANUAL, Protocol::PHANTOM, Protocol::FEED);
                while ($gserver = DBA::fetch($gservers)) {
                        $total += $gserver['total'];
                        $users += $gserver['users'];
 
                        $versionCounts = [];
                        $versions = DBA::p("SELECT COUNT(*) AS `total`, `version` FROM `gserver`
-                               WHERE NOT `failed` AND `platform` = ? AND `detection-method` != ?
-                               GROUP BY `version` ORDER BY `version`", $gserver['platform'], GServer::DETECT_MANUAL);
+                               WHERE NOT `failed` AND `platform` = ? AND `detection-method` != ? AND NOT `network` IN (?, ?)
+                               GROUP BY `version` ORDER BY `version`", $gserver['platform'], GServer::DETECT_MANUAL, Protocol::PHANTOM, Protocol::FEED);
                        while ($version = DBA::fetch($versions)) {
                                $version['version'] = str_replace(["\n", "\r", "\t"], " ", $version['version']);