mirror of
https://github.com/friendica/friendica
synced 2025-04-26 22:30:18 +00:00
Nodeinfo data has moved to key values
This commit is contained in:
parent
4b73335def
commit
73e163100c
6 changed files with 45 additions and 26 deletions
|
@ -25,7 +25,6 @@ use Friendica\BaseDataTransferObject;
|
|||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
|
||||
/**
|
||||
|
@ -45,9 +44,9 @@ class Stats extends BaseDataTransferObject
|
|||
public function __construct(IManageConfigValues $config, Database $database)
|
||||
{
|
||||
if (!empty($config->get('system', 'nodeinfo'))) {
|
||||
$this->user_count = intval($config->get('nodeinfo', 'total_users'));
|
||||
$this->status_count = $config->get('nodeinfo', 'local_posts') + $config->get('nodeinfo', 'local_comments');
|
||||
$this->domain_count = $database->count('gserver', ["`network` in (?, ?) AND NOT `failed`", Protocol::DFRN, Protocol::ACTIVITYPUB]);
|
||||
$this->user_count = intval(DI::keyValue()->get('nodeinfo_total_users'));
|
||||
$this->status_count = DI::keyValue()->get('nodeinfo_local_posts') + DI::keyValue()->get('nodeinfo_local_comments');
|
||||
$this->domain_count = $database->count('gserver', ["`network` in (?, ?) AND NOT `failed` AND NOT `blocked`", Protocol::DFRN, Protocol::ACTIVITYPUB]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue