[UI][Attachment] Use Attachment methods to get the proper URL, rather than crafting it in a template

This commit is contained in:
2021-08-18 14:04:17 +01:00
parent 6799052ff5
commit 4b2a92d052
5 changed files with 17 additions and 11 deletions

View File

@@ -143,9 +143,9 @@ class ImageEncoder extends Plugin
public function onViewAttachmentImage(array $vars, array &$res): bool
{
$res[] = Formatting::twigRenderFile('imageEncoder/imageEncoderView.html.twig',
['attachment' => $vars['attachment'],
'thumbnail_parameters' => $vars['thumbnail_parameters'],
'note' => $vars['note'],
[
'attachment' => $vars['attachment'],
'note' => $vars['note'],
]);
return Event::stop;
}