From: urs_hunkler Date: Sun, 5 Aug 2007 16:42:31 +0000 (+0000) Subject: merged from 1.8 - $thumbwidth not calculated X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=11d6ec135576bb28610a4946003f324fd89e7261;p=moodle.git merged from 1.8 - $thumbwidth not calculated --- diff --git a/mod/data/field/picture/field.class.php b/mod/data/field/picture/field.class.php index 0aa2bd54bc..8ece8a8ec9 100755 --- a/mod/data/field/picture/field.class.php +++ b/mod/data/field/picture/field.class.php @@ -229,7 +229,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;