Skip to content

Commit 0769886

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 9fa4457 + 10cb499 commit 0769886

5 files changed

Lines changed: 8 additions & 5 deletions

File tree

phpBB/includes/acp/acp_attachments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ function main($id, $mode)
10791079
$attachments_per_page = (int) $config['topics_per_page'];
10801080

10811081
// Get total number or orphans older than 3 hours
1082-
$sql = 'SELECT COUNT(attach_id) as num_files, SUM(filesize) as total_size
1082+
$sql = 'SELECT COUNT(attach_id) as num_files, SUM(' . $this->db->cast_expr_to_bigint('filesize') . ') as total_size
10831083
FROM ' . ATTACHMENTS_TABLE . '
10841084
WHERE is_orphan = 1
10851085
AND filetime < ' . (time() - 3*60*60);

phpBB/includes/acp/acp_forums.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2048,7 +2048,7 @@ function delete_forum_content($forum_id)
20482048

20492049
$config->set('num_files', (int) $row['stat'], false);
20502050

2051-
$sql = 'SELECT SUM(filesize) as stat
2051+
$sql = 'SELECT SUM(' . $db->cast_expr_to_bigint('filesize') . ') as stat
20522052
FROM ' . ATTACHMENTS_TABLE;
20532053
$result = $db->sql_query($sql);
20542054
$row = $db->sql_fetchrow($result);

phpBB/includes/acp/acp_main.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ function main($id, $mode)
189189
$config->set('num_files', (int) $db->sql_fetchfield('stat'), false);
190190
$db->sql_freeresult($result);
191191

192-
$sql = 'SELECT SUM(filesize) as stat
192+
$sql = 'SELECT SUM(' . $db->cast_expr_to_bigint('filesize') . ') as stat
193193
FROM ' . ATTACHMENTS_TABLE . '
194194
WHERE is_orphan = 0';
195195
$result = $db->sql_query($sql);

phpBB/includes/functions_convert.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1845,7 +1845,7 @@ function update_dynamic_config()
18451845
$config->set('num_files', (int) $db->sql_fetchfield('stat'), false);
18461846
$db->sql_freeresult($result);
18471847

1848-
$sql = 'SELECT SUM(filesize) as stat
1848+
$sql = 'SELECT SUM(' . $db->cast_expr_to_bigint('filesize') . ') as stat
18491849
FROM ' . ATTACHMENTS_TABLE . '
18501850
WHERE is_orphan = 0';
18511851
$result = $db->sql_query($sql);

phpBB/phpbb/db/migration/data/v310/bot_update.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ class bot_update extends \phpbb\db\migration\migration
1717
{
1818
public static function depends_on()
1919
{
20-
return array('\phpbb\db\migration\data\v310\rc6');
20+
return array(
21+
'\phpbb\db\migration\data\v310\rc6',
22+
'\phpbb\db\migration\data\v310\avatars',
23+
);
2124
}
2225

2326
public function update_data()

0 commit comments

Comments
 (0)