CVS: spip/ecrire inc_filtres.php3,1.114,1.115

Update of /home/spip-cvs/spip/ecrire
In directory alan:/tmp/cvs-serv15636/ecrire

Modified Files:
  inc_filtres.php3
Log Message:
filtrage de logos

Index: inc_filtres.php3

RCS file: /home/spip-cvs/spip/ecrire/inc_filtres.php3,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -d -r1.114 -r1.115
--- a/inc_filtres.php3 15 Apr 2004 14:41:59 -0000 1.114
+++ b/inc_filtres.php3 15 Apr 2004 19:46:23 -0000 1.115
@@ -41,6 +41,9 @@
   // supprimer tags et sauts de ligne
   //$texte = str_replace("\n"," ",textebrut($texte));

+ // Ajout Yann pour accents encodés
+ $texte = html_entity_decode($texte);
+
   // " -> " et tout ce genre de choses
   $texte = entites_html($texte);
   $texte = str_replace("&", "&", $texte);
@@ -537,11 +540,14 @@
   if (eregi("name=\'([^']+)\'", $img, $regs)) $name = $regs[1];
   if (eregi("hspace=\'([^']+)\'", $img, $regs)) $espace = $regs[1];

+ if (!$logo)
+ $logo = 'IMG/'.ereg_replace('(../|IMG/)', '', $img); // [(#LOGO_ARTICLE|fichier|reduire_image{100})]
+
   if (@file_exists($logo) AND eregi("(IMG/.*)\.(jpg|gif|png)$", $logo, $regs)) {
     $nom = $regs[1];
     $format = $regs[2];
- $destination = $logo.'-'.$taille.'x'.$taille_y;
- if ($preview = creer_vignette($nom, $taille, $taille_y, $format, $destination)) {
+ $destination = $nom.'-'.$taille.'x'.$taille_y;
+ if ($preview = creer_vignette($logo, $taille, $taille_y, $format, $destination)) {
       $vignette = $preview['fichier'];
       $width = $preview['width'];
       $height = $preview['height'];