mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
$thumbheigt was calculated instead of $thumbwidth
This commit is contained in:
parent
ef9b262c7c
commit
db8a7ac9d1
1 changed files with 1 additions and 1 deletions
|
@ -217,7 +217,7 @@ class data_field_picture extends data_field_file {
|
|||
if ($thumbwidth && !$thumbheight) {
|
||||
$thumbheight = $image->height * $thumbwidth / $image->width;
|
||||
} else if($thumbheight && !$thumbwidth) {
|
||||
$thumbheight = $image->width * $thumbheight / $image->height;
|
||||
$thumbwidth = $image->width * $thumbheight / $image->height;
|
||||
} else { // BOTH are set - may need to crop if aspect ratio differs
|
||||
$hratio = $image->height / $thumbheight;
|
||||
$wratio = $image->width / $thumbwidth;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue