]> git.mjollnir.org Git - moodle.git/commitdiff
merged from 1.8 - $thumbwidth not calculated
authorurs_hunkler <urs_hunkler>
Sun, 5 Aug 2007 16:42:31 +0000 (16:42 +0000)
committerurs_hunkler <urs_hunkler>
Sun, 5 Aug 2007 16:42:31 +0000 (16:42 +0000)
mod/data/field/picture/field.class.php

index 0aa2bd54bcad3a4615f4c020abaaa9c94dff7daa..8ece8a8ec9aaf5231c861d3e38567f1ba7d97692 100755 (executable)
@@ -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;