]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14320, remove useless icon in edit entry page, merged from MOODLE_19_STABLE
authordongsheng <dongsheng>
Thu, 17 Apr 2008 09:45:09 +0000 (09:45 +0000)
committerdongsheng <dongsheng>
Thu, 17 Apr 2008 09:45:09 +0000 (09:45 +0000)
mod/data/field/file/field.class.php

index 8cbb4cb5efd94d37417842df7ce193cd5e9ef79f..24a8c494897fba1fa3680940f5dab87d26236d37 100755 (executable)
@@ -71,7 +71,7 @@ class data_field_file extends data_field_base {
         $str .= '</fieldset>';
         $str .= '</div>';
 
-        if ($recordid and isset($content)){                     // Print icon
+        if ($recordid and isset($content) and !empty($content->content)){                     // Print icon
             require_once($CFG->libdir.'/filelib.php');
             $icon = mimeinfo('icon', $src);
             $str .= '<img src="'.$CFG->pixpath.'/f/'.$icon.'" class="icon" alt="'.$icon.'" />'.