MDL-19690 fix some breakage.

This commit is contained in:
tjhunt 2009-07-02 12:35:13 +00:00
parent 5ef444007d
commit 42d5737a94
3 changed files with 5 additions and 8 deletions

View file

@ -1333,9 +1333,9 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
if (!empty($customicon)) {
if (substr($customicon, 0, 4) === 'mod/') {
list($modname, $iconname) = explode('/', substr($customicon, 4), 2);
$icon = $OUTPUT->mod_icon_url($iconname, $modname);
$icon = $OUTPUT->mod_icon_url(str_replace(array('.gif', '.png'), '', $iconname), $modname);
} else {
$icon = $OUTPUT->old_icon_url($customicon);
$icon = $OUTPUT->old_icon_url(str_replace(array('.gif', '.png'), '', $customicon));
}
} else {
$icon = "" . $OUTPUT->mod_icon_url('icon', $mod->modname) . "";