Merge branch '3.1.x' into 3.2.x

* 3.1.x:
  [ticket/14291] Do not update filesize if displaying thumbnail
This commit is contained in:
Andreas Fischer 2016-06-11 13:45:48 +02:00
commit cddf80c2e6

View file

@ -166,7 +166,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)
}
// 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 . '