mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-49627 core: Update uses of generate_image_thumbnail
This removes the need to write tempfiles in these locations.
This commit is contained in:
parent
b7067f065e
commit
2b53b13ff7
3 changed files with 5 additions and 16 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue