Skip to content

Commit

Permalink
Merge branch 'wip-MDL-29231-master' of git://github.com/phalacee/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed Oct 25, 2011
2 parents 6327bf8 + 020088d commit d040ea8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/resource/lib.php
Expand Up @@ -257,7 +257,7 @@ function resource_get_coursemodule_info($coursemodule) {
$fs = get_file_storage();
$files = $fs->get_area_files($context->id, 'mod_resource', 'content', 0, 'sortorder DESC, id ASC', false); // TODO: this is not very efficient!!
if (count($files) >= 1) {
$mainfile = array_pop($files);
$mainfile = reset($files);
$info->icon = file_extension_icon($mainfile->get_filename());
$resource->mainfile = $mainfile->get_filename();
}
Expand Down

0 comments on commit d040ea8

Please sign in to comment.