Merge branch 'MDL74387_master' of https://github.com/Amrita1991/moodle

This commit is contained in:
Jun Pataleta 2022-06-29 23:20:33 +08:00
commit fc87543d52

View File

@ -555,9 +555,10 @@ function url_guess_icon($fullurl, $size = null) {
$icon = file_extension_icon($fullurl, $size);
$htmlicon = file_extension_icon('.htm', $size);
$unknownicon = file_extension_icon('', $size);
$phpicon = file_extension_icon('.php', $size); // Exception for php files.
// We do not want to return those icon types, the module icon is more appropriate.
if ($icon === $unknownicon || $icon === $htmlicon) {
if ($icon === $unknownicon || $icon === $htmlicon || $icon === $phpicon) {
return null;
}