diff --git a/modules/comment/comment.item.php b/modules/comment/comment.item.php index e80752d825..40bc786409 100644 --- a/modules/comment/comment.item.php +++ b/modules/comment/comment.item.php @@ -593,7 +593,7 @@ function getThumbnail($width = 80, $height = 0, $thumbnail_type = '') } else { - return $thumbnail_url; + return $thumbnail_url . '?' . date('YmdHis', filemtime($thumbnail_file)); } } @@ -685,18 +685,13 @@ function getThumbnail($width = 80, $height = 0, $thumbnail_type = '') // Remove lockfile FileHandler::removeFile($thumbnail_lockfile); - // Return the thumbnail path if it was successfully generated - if($output) - { - return $thumbnail_url; - } // Create an empty file if thumbnail generation failed - else + if(!$output) { FileHandler::writeFile($thumbnail_file, '','w'); } - return; + return $thumbnail_url . '?' . date('YmdHis', filemtime($thumbnail_file)); } function isCarted() diff --git a/modules/document/document.item.php b/modules/document/document.item.php index d2775edd53..4f016fb710 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -865,7 +865,7 @@ function getThumbnail($width = 80, $height = 0, $thumbnail_type = '') } else { - return $thumbnail_url; + return $thumbnail_url . '?' . date('YmdHis', filemtime($thumbnail_file)); } } @@ -959,18 +959,13 @@ function getThumbnail($width = 80, $height = 0, $thumbnail_type = '') // Remove lockfile FileHandler::removeFile($thumbnail_lockfile); - // Return the thumbnail path if it was successfully generated - if($output_file) - { - return $thumbnail_url; - } // Create an empty file if thumbnail generation failed - else + if(!$output_file) { FileHandler::writeFile($thumbnail_file, '','w'); } - return; + return $thumbnail_url . '?' . date('YmdHis', filemtime($thumbnail_file)); } /**