Update of /home/spip-cvs/spip
In directory alan:/tmp/cvs-serv12739
Modified Files:
inc-compilo-index.php3
Log Message:
bug (Olivier <M. Go>)
<BOUCLE_documents_article_test(DOCUMENTS){par num titre}{0,10}> [(#PUCE)][(#TITRE|supprimer_numero)] ([(#TYPE_DOCUMENT)])
</BOUCLE_documents_article_test>
donnait deux fois le type de document
http://thread.gmane.org/gmane.comp.web.spip.devel/20214
Index: inc-compilo-index.php3
RCS file: /home/spip-cvs/spip/inc-compilo-index.php3,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- inc-compilo-index.php3 29 Aug 2004 07:30:07 -0000 1.2
+++ inc-compilo-index.php3 29 Aug 2004 21:10:50 -0000 1.3
@@ -140,28 +140,29 @@
// entite SPIP alias d'un champ SQL
if (!is_array($excep)) {
$e = $excep;
+ $c = $excep;
}
- // entite SPIP alias d'un champ dans une autre table SQL
+ // entite SPIP alias d'un champ dans une autre table SQL
else {
$t = $excep[0];
- $e = $excep[1];
+ $e = $excep[1].' AS '.$c;
}
}
else {
- // $e est le type SQL de l'entree (ici utile comme booleen)
+ // $e est le type SQL de l'entree
// entite SPIP homonyme au champ SQL
if ($desc['field'][$c])
$e = $c;
else
- $e = '';
+ unset($c);
}
#spip_log("Dans $idb ($t $e): $desc");
// On l'a trouve
- if ($e) {
+ if ($c) {
$boucles[$idb]->select[] = $t . "." . $e;
- return '$Pile[$SP' . ($i ? "-$i" : "") . '][\'' . $e . '\']';
+ return '$Pile[$SP' . ($i ? "-$i" : "") . '][\'' . $c . '\']';
}
// Sinon on remonte d'un cran