mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Merge branch '3.3.x'
This commit is contained in:
commit
10cb4991a0
4 changed files with 4 additions and 4 deletions
|
@ -1079,7 +1079,7 @@ class acp_attachments
|
|||
$attachments_per_page = (int) $config['topics_per_page'];
|
||||
|
||||
// Get total number or orphans older than 3 hours
|
||||
$sql = 'SELECT COUNT(attach_id) as num_files, SUM(filesize) as total_size
|
||||
$sql = 'SELECT COUNT(attach_id) as num_files, SUM(' . $this->db->cast_expr_to_bigint('filesize') . ') as total_size
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE is_orphan = 1
|
||||
AND filetime < ' . (time() - 3*60*60);
|
||||
|
|
|
@ -2048,7 +2048,7 @@ class acp_forums
|
|||
|
||||
$config->set('num_files', (int) $row['stat'], false);
|
||||
|
||||
$sql = 'SELECT SUM(filesize) as stat
|
||||
$sql = 'SELECT SUM(' . $db->cast_expr_to_bigint('filesize') . ') as stat
|
||||
FROM ' . ATTACHMENTS_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
|
|
|
@ -189,7 +189,7 @@ class acp_main
|
|||
$config->set('num_files', (int) $db->sql_fetchfield('stat'), false);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT SUM(filesize) as stat
|
||||
$sql = 'SELECT SUM(' . $db->cast_expr_to_bigint('filesize') . ') as stat
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE is_orphan = 0';
|
||||
$result = $db->sql_query($sql);
|
||||
|
|
|
@ -1845,7 +1845,7 @@ function update_dynamic_config()
|
|||
$config->set('num_files', (int) $db->sql_fetchfield('stat'), false);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT SUM(filesize) as stat
|
||||
$sql = 'SELECT SUM(' . $db->cast_expr_to_bigint('filesize') . ') as stat
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE is_orphan = 0';
|
||||
$result = $db->sql_query($sql);
|
||||
|
|
Loading…
Add table
Reference in a new issue