Fixed landing page members count.
This commit is contained in:
parent
36994255f7
commit
f3e53479ee
1 changed files with 4 additions and 6 deletions
|
@ -26,13 +26,11 @@ class LandingRoutes implements RouteHandler {
|
||||||
$stats->types = 0;
|
$stats->types = 0;
|
||||||
$stats->members = 0;
|
$stats->members = 0;
|
||||||
|
|
||||||
$result = $this->dbCtx->connection->query('SELECT COUNT(upload_id) FROM prm_uploads');
|
$result = $this->dbCtx->connection->query('SELECT COUNT(*), COUNT(DISTINCT user_id) FROM prm_uploads');
|
||||||
if($result->next())
|
if($result->next()) {
|
||||||
$stats->uploads = $result->getInteger(0);
|
$stats->uploads = $result->getInteger(0);
|
||||||
|
$stats->members = $result->getInteger(1);
|
||||||
$result = $this->dbCtx->connection->query('SELECT COUNT(user_id) FROM prm_users WHERE user_restricted IS NULL');
|
}
|
||||||
if($result->next())
|
|
||||||
$stats->members = $result->getInteger(0);
|
|
||||||
|
|
||||||
$result = $this->dbCtx->connection->query('SELECT COUNT(*), SUM(file_size), COUNT(DISTINCT file_type) FROM prm_files');
|
$result = $this->dbCtx->connection->query('SELECT COUNT(*), SUM(file_size), COUNT(DISTINCT file_type) FROM prm_files');
|
||||||
if($result->next()) {
|
if($result->next()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue