mirror of
https://github.com/friendica/friendica
synced 2024-11-18 19:43:46 +00:00
Use DBA::fetchFirst instead of DBA::p for aggregate query in Module\Admin\Federation
This commit is contained in:
parent
451a06a597
commit
2a035b9b2f
1 changed files with 195 additions and 198 deletions
|
@ -43,7 +43,7 @@ class Federation extends BaseAdminModule
|
|||
foreach ($platforms as $platform) {
|
||||
// get a total count for the platform, the name and version of the
|
||||
// highest version and the protocol tpe
|
||||
$platformCountStmt = DBA::p('SELECT
|
||||
$platformCount = DBA::fetchFirst('SELECT
|
||||
COUNT(*) AS `total`,
|
||||
SUM(`registered-users`) AS `users`,
|
||||
ANY_VALUE(`platform`) AS `platform`,
|
||||
|
@ -52,12 +52,9 @@ class Federation extends BaseAdminModule
|
|||
WHERE `platform` LIKE ?
|
||||
AND `last_contact` >= `last_failure`
|
||||
ORDER BY `version` ASC', $platform);
|
||||
$platformCount = DBA::fetch($platformCountStmt);
|
||||
$total += $platformCount['total'];
|
||||
$users += $platformCount['users'];
|
||||
|
||||
DBA::close($platformCountStmt);
|
||||
|
||||
// what versions for that platform do we know at all?
|
||||
// again only the active nodes
|
||||
$versionCountsStmt = DBA::p('SELECT
|
||||
|
|
Loading…
Reference in a new issue