MDL-49627 core: Update uses of generate_image_thumbnail

This removes the need to write tempfiles in these locations.
This commit is contained in:
Andrew Nicols 2015-03-23 09:13:26 +08:00
parent b7067f065e
commit 2b53b13ff7
3 changed files with 5 additions and 16 deletions

View file

@ -486,7 +486,6 @@ class repository_filesystem extends repository {
return null;
}
$filename = sha1($filecontents);
unset($filecontents);
// Try to get generated thumbnail for this file.
$fs = get_file_storage();
@ -499,7 +498,7 @@ class repository_filesystem extends repository {
} else {
$size = 24;
}
if (!$data = @generate_image_thumbnail($origfile, $size, $size)) {
if (!$data = generate_image_thumbnail_from_string($filecontents, $size, $size)) {
// Generation failed.
return null;
}