merged from 1.8 - $thumbwidth not calculated

This commit is contained in:
urs_hunkler
2007-08-05 16:42:31 +00:00
parent 903dcaba78
commit 11d6ec1355
+1 -1
View File
@@ -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;