From 22193f145c88e32f274d90f917a6137c85729222 Mon Sep 17 00:00:00 2001 From: b_b <bruno@eliaz.fr> Date: Tue, 6 Sep 2022 15:56:58 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20r=C3=A9parer=20l'usage=20de=20`#LOGO=5FD?= =?UTF-8?q?OCUMENT{align}`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit en posant la bonne classe sur l'image générée au lieu de lui ajouter un attribut align Fix: #4877 --- CHANGELOG.md | 1 + inc/documents.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff3d1789..b5b75ca6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ ### Fixed +- #4907 Réparer l'usage de `#LOGO_DOCUMENT{align}` - #4905 Utiliser une déclaration moins prioritaire pour ajouter le traitement typo sur le champ `#CREDITS` - spip/spip#5274 Homogénéiser les labels des listes - #4902 Suppression des boutons excédentaires de sens de tri sur certaines listes de documents diff --git a/inc/documents.php b/inc/documents.php index 00df869a..f77d5dbf 100644 --- a/inc/documents.php +++ b/inc/documents.php @@ -142,10 +142,10 @@ function vignette_automatique($img, $doc, $lien, $x = 0, $y = 0, $align = '', $c $img = image_reduire($img, $x, $y); } $img = inserer_attribut($img, 'alt', ''); - $img = inserer_attribut($img, 'class', trim($class)); if ($align) { - $img = inserer_attribut($img, 'align', $align); + $class .= " spip_logo_$align"; } + $img = inserer_attribut($img, 'class', trim($class)); if (!$lien) { return $img; -- GitLab