mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 15:27:42 +02:00
[ticket/9627] Make sure the database record for the filesize is correct.
PHPBB3-9627
This commit is contained in:
@@ -157,6 +157,16 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
|||||||
trigger_error('UNABLE_TO_DELIVER_FILE');
|
trigger_error('UNABLE_TO_DELIVER_FILE');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure the database record for the filesize is correct
|
||||||
|
if ($size > 0 && $size != $attachment['filesize'])
|
||||||
|
{
|
||||||
|
// Update database record
|
||||||
|
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
|
||||||
|
SET filesize = ' . (int) $size . '
|
||||||
|
WHERE attach_id = ' . (int) $attachment['attach_id'];
|
||||||
|
$db->sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
// Now the tricky part... let's dance
|
// Now the tricky part... let's dance
|
||||||
header('Pragma: public');
|
header('Pragma: public');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user