Update of /home/spip-cvs/spip
In directory alan:/tmp/cvs-serv19275
Modified Files:
inc-calcul-outils.php3
Log Message:
rubon0 essayé systématiquement
Index: inc-calcul-outils.php3
RCS file: /home/spip-cvs/spip/inc-calcul-outils.php3,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- inc-calcul-outils.php3 13 Oct 2004 15:32:02 -0000 1.17
+++ inc-calcul-outils.php3 25 Oct 2004 19:23:56 -0000 1.18
@@ -38,8 +38,9 @@
'SITE' => 'site'
);
$type = $table_logos[$type];
- # attention au cas $id = '0' pour LOGO_SITE_SPIP ==> intval
- while ($id) {
+ # attention au cas $id = '0' pour LOGO_SITE_SPIP
+ # utiliser intval et toujours faire au moins un essai
+ while (1) {
$on = cherche_image_nommee($type . $onoff . intval($id));
if ($on)
{ if ($ff)
@@ -56,8 +57,8 @@
else if ($id_rubrique)
{$type = 'rub'; $id = $id_rubrique; $id_rubrique = 0;}
else if ($type = 'rub') $id = sql_parent($id);
+ if (!$id) return '';
}
- return '';
}
// Renvoie le code html pour afficher le logo, avec ou sans survol, avec ou sans lien, etc.