From: moodler Date: Sat, 6 Dec 2003 07:34:55 +0000 (+0000) Subject: Fix for image display - see Bug 695 Thanks, Gustav X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ee273b61a42a50c2c4666e3d9a861858cfe5b96a;p=moodle.git Fix for image display - see Bug 695 Thanks, Gustav --- diff --git a/mod/resource/view.php b/mod/resource/view.php index 24a016572f..e9762273de 100644 --- a/mod/resource/view.php +++ b/mod/resource/view.php @@ -111,7 +111,9 @@ $embedded = false; - if (mimeinfo("icon", $fullurl) == "image.gif") { // It's an image + $inlinetypes = array('image/gif','image/jpg','image/png'); + + if (in_array(mimeinfo("type", $fullurl), $inlinetypes)) { // It's an image $embedded = true; $resourceimage = true; } else { @@ -291,4 +293,4 @@ break; } -?> \ No newline at end of file +?>