Skip to content

Instantly share code, notes, and snippets.

@mudrd8mz
Created May 16, 2012 07:19
Show Gist options
  • Save mudrd8mz/2708287 to your computer and use it in GitHub Desktop.
Save mudrd8mz/2708287 to your computer and use it in GitHub Desktop.
diff --git a/lib/filelib.php b/lib/filelib.php
index ba19410..4569a86 100644
--- a/lib/filelib.php
+++ b/lib/filelib.php
@@ -602,8 +602,8 @@ function file_get_drafarea_files($draftitemid, $filepath = '/') {
$item->url = $itemurl->out();
$item->thumbnail = $OUTPUT->pix_url(file_extension_icon($item->filename, 32))->out(false);
if ($imageinfo = $file->get_imageinfo()) {
- $item->realthumbnail = $itemurl->out(false, array('preview' => 'thumb'));
- $item->realicon = $itemurl->out(false, array('preview' => 'tinyicon'));
+ $item->realthumbnail = $itemurl->out(false, array('preview' => 'thumb', 'contenthash' => $file->get_contenthash()));
+ $item->realicon = $itemurl->out(false, array('preview' => 'tinyicon', 'contenthash' => $file->get_contenthash()));
$item->image_width = $imageinfo['width'];
$item->image_height = $imageinfo['height'];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment