MDL-25840 blog - fixed broken image file image attachment display
authorAparup Banerjee <aparup@moodle.com>
Wed, 27 Apr 2011 03:39:01 +0000 (11:39 +0800)
committerAparup Banerjee <aparup@moodle.com>
Wed, 27 Apr 2011 03:39:01 +0000 (11:39 +0800)
blog/locallib.php

index 1cc4b0c..77d2ffd 100644 (file)
@@ -517,7 +517,7 @@ class blog_entry {
 
             } else {
                 if (in_array($type, array('image/gif', 'image/jpeg', 'image/png'))) {    // Image attachments don't get printed as links
-                    $imagereturn .= "<br />" . $OUTPUT->pix_icon($ffurl, $filename);
+                    $imagereturn .= '<br /><img src="'.$ffurl.'" alt="" />';
                 } else {
                     $imagereturn .= html_writer::link($ffurl, $image);
                     $imagereturn .= format_text(html_writer::link($ffurl, $filename), FORMAT_HTML, array('context'=>$syscontext));