]> git.mjollnir.org Git - moodle.git/commitdiff
Fix for image display - see Bug 695 Thanks, Gustav
authormoodler <moodler>
Sat, 6 Dec 2003 07:34:55 +0000 (07:34 +0000)
committermoodler <moodler>
Sat, 6 Dec 2003 07:34:55 +0000 (07:34 +0000)
mod/resource/view.php

index 24a016572f2a86fe528bddac6409bb669dc8c72d..e9762273deeaa5632b43fc79ed55d2ed35231085 100644 (file)
 
             $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 {
             break;
     }
 
-?>
\ No newline at end of file
+?>