Skip to content

Commit

Permalink
MDL-81450 mod_forum: Reduce size of file icon in HTML mails
Browse files Browse the repository at this point in the history
@co-authored-by: Mateusz Walczak
  • Loading branch information
PhMemmel committed Sep 19, 2024
1 parent f6141a6 commit 188308a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mod/forum/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2581,7 +2581,14 @@ function forum_print_attachments($post, $cm, $type) {
foreach ($files as $file) {
$filename = $file->get_filename();
$mimetype = $file->get_mimetype();
$iconimage = $OUTPUT->pix_icon(file_file_icon($file), get_mimetype_description($file), 'moodle', array('class' => 'icon'));
$iconimage = $OUTPUT->pix_icon(file_file_icon($file),
get_mimetype_description($file),
'moodle',
[
'class' => 'icon',
'style' => 'max-width: 24px; max-height: 24px; vertical-align: middle;'
]
);
$path = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.$context->id.'/mod_forum/attachment/'.$post->id.'/'.$filename);

if ($type == 'html') {
Expand Down

0 comments on commit 188308a

Please sign in to comment.