MDL-25840 blog - fixed broken image file image attachment display

This commit is contained in:
Aparup Banerjee 2011-04-27 11:39:01 +08:00
parent 4452ed6f17
commit 20b503841b

View 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));