-
Improvement
-
Resolution: Duplicate
-
Minor
-
None
-
4.1.14
-
None
-
MOODLE_401_STABLE
Hi, I see that the mimeinfo function returns the SVG icon only if it has the associated postfix, ie pdf-24.svg pdf-48.svg etc.
I think it would be better that if the xxx.svg icon is there it is returned instead, even if "xxx-24" is requested.
This would save a lot of effort and space.
Just in case I'll put here a suggested modification to implement this feature
// lib/filelib.php
|
// function mimeinfo()
|
function mimeinfo($element, $filename) {
|
......
|
// find the file with the closest size, first search for specific icon then for default icon |
|
foreach ($iconpostfixes as $size => $postfix) {
|
$fullname = $CFG->dirroot.'/pix/f/'.$filename; |
if ($iconsize >= $size && |
(file_exists($fullname.'.svg') || file_exists($fullname.$postfix.'.png') || file_exists($fullname.$postfix.'.gif'))) { |
return $filename.$postfix; |
}
|
}
|
.....
|
}
|
- duplicates
-
MDL-78884 Remove sized files for MIME icons and update them with new SVG files
-
- Closed
-