mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/16881] Fix ACP statistics
PHPBB3-16881
This commit is contained in:
parent
3d76942cdf
commit
95fa6cceee
1 changed files with 8 additions and 15 deletions
|
@ -544,8 +544,6 @@ class acp_main
|
||||||
$files_per_day = $total_files;
|
$files_per_day = $total_files;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($config['allow_attachments'] || $config['allow_pm_attach'])
|
|
||||||
{
|
|
||||||
$sql = 'SELECT COUNT(attach_id) AS total_orphan
|
$sql = 'SELECT COUNT(attach_id) AS total_orphan
|
||||||
FROM ' . ATTACHMENTS_TABLE . '
|
FROM ' . ATTACHMENTS_TABLE . '
|
||||||
WHERE is_orphan = 1
|
WHERE is_orphan = 1
|
||||||
|
@ -553,11 +551,6 @@ class acp_main
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$total_orphan = (int) $db->sql_fetchfield('total_orphan');
|
$total_orphan = (int) $db->sql_fetchfield('total_orphan');
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$total_orphan = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$dbsize = get_database_size();
|
$dbsize = get_database_size();
|
||||||
|
|
||||||
|
@ -575,7 +568,7 @@ class acp_main
|
||||||
'DBSIZE' => $dbsize,
|
'DBSIZE' => $dbsize,
|
||||||
'UPLOAD_DIR_SIZE' => $upload_dir_size,
|
'UPLOAD_DIR_SIZE' => $upload_dir_size,
|
||||||
'TOTAL_ORPHAN' => $total_orphan,
|
'TOTAL_ORPHAN' => $total_orphan,
|
||||||
'S_TOTAL_ORPHAN' => ($total_orphan === false) ? false : true,
|
'S_TOTAL_ORPHAN' => (bool) !$total_orphan,
|
||||||
'GZIP_COMPRESSION' => ($config['gzip_compress'] && @extension_loaded('zlib')) ? $user->lang['ON'] : $user->lang['OFF'],
|
'GZIP_COMPRESSION' => ($config['gzip_compress'] && @extension_loaded('zlib')) ? $user->lang['ON'] : $user->lang['OFF'],
|
||||||
'DATABASE_INFO' => $db->sql_server_info(),
|
'DATABASE_INFO' => $db->sql_server_info(),
|
||||||
'PHP_VERSION_INFO' => PHP_VERSION,
|
'PHP_VERSION_INFO' => PHP_VERSION,
|
||||||
|
|
Loading…
Add table
Reference in a new issue