-
Bug
-
Resolution: Fixed
-
Trivial
-
3.1.6, 3.2.0-dev
-
None
-
PHP 5.6, MySQL 5.6, Firefox 44
This issue relates to the image attachments with thumbnails.
How to reproduce:
+ open any page containing an attachment thumbnail,
+ open that attachment in its full size in another browser window,
+ refresh that two pages alternately, emulating the activity of several users.
Filesize will be overwritten every time, from full image size to thumbnail size and vice versa.
This doesn’t affect viewing/downloading process, but filesize information, displayed on board pages, becomes inconstant and incorrect.
Possible fix:
--- includes/functions_download.php
|
+++ includes/functions_download.php
|
@@ -165,7 +165,7 @@
|
}
|
|
// Make sure the database record for the filesize is correct
|
- if ($size > 0 && $size != $attachment['filesize'])
|
+ if ($size > 0 && $size != $attachment['filesize'] && strpos($attachment['physical_filename'], 'thumb_') === false)
|
{
|
// Update database record
|
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
|
|