diff --git a/.gitattributes b/.gitattributes
index 1cd90bf8466879e81b5796bc6bb6ea83627c0895..a85363d98be8c2e3fc773712d4a5f4233199a23d 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -509,7 +509,7 @@ ecrire/exec/mots_type.php -text
 ecrire/exec/naviguer.php -text
 ecrire/exec/petitionner.php -text
 ecrire/exec/plonger.php -text
-ecrire/exec/puce_statut_article.php -text
+ecrire/exec/puce_statut.php -text
 ecrire/exec/recherche.php -text
 ecrire/exec/rechercher.php -text
 ecrire/exec/rechercher_auteur.php -text
diff --git a/ecrire/exec/articles_tous.php b/ecrire/exec/articles_tous.php
index 1faf0c7880dfc5eba93fce3188925b6bc8c78e61..9b7edffb226629fe8381e72a6b734d0e05ab7335 100644
--- a/ecrire/exec/articles_tous.php
+++ b/ecrire/exec/articles_tous.php
@@ -348,6 +348,7 @@ function afficher_rubriques_filles(&$article, &$enfant, &$text_article, $id_pare
 function afficher_article_tous_rubrique(&$text_article, $tous, $id_rubrique, $flag_trad) 
 {
 	$res = '';
+	$puce_statut = charger_fonction('puce_statut', 'inc');
 	while(list(,$zarticle) = each($tous) ) {
 		$attarticle = &$text_article[$zarticle];
 		$zelang = $attarticle["lang"];
@@ -365,7 +366,7 @@ function afficher_article_tous_rubrique(&$text_article, $tous, $id_rubrique, $fl
 			}
 			$res .= "\n"
 				. "<span class='icone'> </span>"
-			  . "<div class='puce_statut'>".puce_statut_article($zarticle, $attarticle["statut"], $id_rubrique)."</div>"
+			  . "<div class='puce_statut'>".$puce_statut($zarticle, $attarticle["statut"], $id_rubrique,'article')."</div>"
 			  . "<span><a"
 			  . ($auteurs ? (' title="' . htmlspecialchars($auteurs). '"') :'')
 			  . "\nhref='"
diff --git a/ecrire/exec/puce_statut_article.php b/ecrire/exec/puce_statut.php
similarity index 88%
rename from ecrire/exec/puce_statut_article.php
rename to ecrire/exec/puce_statut.php
index 1c9249d85b3532971e45823814e042433b2532a6..bc67fea1d1f3242843c3a076ad8796884197468b 100644
--- a/ecrire/exec/puce_statut_article.php
+++ b/ecrire/exec/puce_statut.php
@@ -15,7 +15,7 @@ if (!defined("_ECRIRE_INC_VERSION")) return;
 include_spip('inc/presentation');
 
 // http://doc.spip.org/@exec_puce_statut_article_dist
-function exec_puce_statut_article_dist()
+function exec_puce_statut_dist()
 {
 	$id = intval(_request('id'));
 	$type = _request('type');
@@ -30,6 +30,7 @@ function exec_puce_statut_article_dist()
 		$id = 0;
 		$statut = 'prop'; // arbitraire
 	}
-	ajax_retour(puce_statut_article($id,$statut,$id_rubrique,$type, true));
+	$puce_statut = charger_fonction('puce_statut', 'inc');
+	ajax_retour($puce_statut($id,$statut,$id_rubrique,$type, true));
 }
 ?>
\ No newline at end of file
diff --git a/ecrire/inc/afficher_objets.php b/ecrire/inc/afficher_objets.php
index 031b43078d75b5fd008d6779d8f61dc49667b3b4..ba67489d87586ce86b443bd6db41771ed8fc8416 100644
--- a/ecrire/inc/afficher_objets.php
+++ b/ecrire/inc/afficher_objets.php
@@ -457,7 +457,8 @@ function afficher_articles_trad_boucle($row)
 	$lang = $row['lang'];
 
 	// La petite puce de changement de statut
-	$vals[] = puce_statut_article($id_article, $statut, $id_rubrique);
+	$puce_statut = charger_fonction('puce_statut', 'inc');
+	$vals[] = $puce_statut($id_article, $statut, $id_rubrique,'article');
 
 	// Le titre (et la langue)
 	
diff --git a/ecrire/inc/formater_article.php b/ecrire/inc/formater_article.php
index 22f233d254039ec8765231615fb323646d23a37f..10d6353212d8ea4a4293632fd709bc7703769f1f 100644
--- a/ecrire/inc/formater_article.php
+++ b/ecrire/inc/formater_article.php
@@ -19,7 +19,7 @@ function inc_formater_article_dist($row)
 {
 	global $options, $spip_lang_right, $spip_display;
 	static $pret = false;
-	static $chercher_logo, $img_admin, $formater_auteur, $nb, $langue_defaut, $afficher_langue;
+	static $chercher_logo, $img_admin, $formater_auteur, $nb, $langue_defaut, $afficher_langue, $puce_statut;
 
 	if (!$pret) {
 		$chercher_logo = ($spip_display != 1 AND $spip_display != 4 AND $GLOBALS['meta']['image_process'] != "non");
@@ -34,6 +34,7 @@ function inc_formater_article_dist($row)
 			  ? $GLOBALS['meta']['langue_site']
 			  : $GLOBALS['langue_rubrique'];
 		}
+		$puce_statut = charger_fonction('puce_statut', 'inc');
 		$pret = true;
 	}
 
@@ -56,7 +57,7 @@ function inc_formater_article_dist($row)
 	$descriptif = $row['descriptif'];
 	$lang_dir = lang_dir(($lang = $row['lang']) ? changer_typo($lang):'');
 
-	$vals[]= puce_statut_article($id_article, $statut, $id_rubrique);
+	$vals[]= $puce_statut($id_article, $statut, $id_rubrique,'article');
 
 	$vals[]= "<div>"
 	. "<a href='"
diff --git a/ecrire/inc/presentation.php b/ecrire/inc/presentation.php
index 367e15127004ef7d902f9cba3998bb7fcd250c60..8ffa1b7983f6b10a83632adf2efd54d94442c639 100644
--- a/ecrire/inc/presentation.php
+++ b/ecrire/inc/presentation.php
@@ -1254,10 +1254,6 @@ function meme_rubrique($id_rubrique, $id, $type, $order='date', $limit=NULL, $aj
 {
 	include_spip('inc/afficher_objets');
 
-	// propose de tout publier + nombre d'elements
-	// du code experimental qu'on peut activer via un switch
-	define('_MODE_MEME_RUBRIQUE', 'non');
-
 	if (!$limit) $limit = 10;
 
 	$table = $type . 's';
@@ -1279,15 +1275,6 @@ function meme_rubrique($id_rubrique, $id, $type, $order='date', $limit=NULL, $aj
 	$fstatut = 'puce_statut_' . $type;
 	$idom = 'rubrique_' . $table;
 
-	if (_MODE_MEME_RUBRIQUE == 'oui') {
-		$statut = 'prop';// arbitraire
-
-		$puce_rubrique = ($type == 'article')
-		  ?  (puce_statut_article(0, $statut, $id_rubrique, $idom).'&nbsp;')
-		  : ''; 
-# (puce_statut_breve(0, $statut, $id_rubrique, $type) .'&nbsp;'); manque Ajax
-	} else $puce_rubrique = '';
-
 	while($row = spip_fetch_array($voss)) {
 		$id = $row['id'];
 		$num = afficher_numero_edit($id, $key, $type);
@@ -1301,7 +1288,7 @@ function meme_rubrique($id_rubrique, $id, $type, $order='date', $limit=NULL, $aj
 		$retour .= "<tr class='tr_liste' style='background-color: #e0e0e0;'><td>$statut</td><td>$href</td><td style='width: 25%;'>$num</td></tr>";
 	}
 
-	$icone =  $puce_rubrique . '<b>' . _T('info_meme_rubrique')  . '</b>';
+	$icone =  '<b>' . _T('info_meme_rubrique')  . '</b>';
 	$bouton = bouton_block_depliable(_T('info_meme_rubrique'),true,'memerub');	
 
 	$retour = 
diff --git a/ecrire/inc/puce_statut.php b/ecrire/inc/puce_statut.php
index 0019417a1d690be1a725ac4a3c24920464f2be79..ee7ec4d8e49efefc6acc2747ccf08a8674ffee81 100644
--- a/ecrire/inc/puce_statut.php
+++ b/ecrire/inc/puce_statut.php
@@ -13,17 +13,17 @@
 if (!defined("_ECRIRE_INC_VERSION")) return;
 
 // http://doc.spip.org/@inc_puce_statut_dist
-function inc_puce_statut_dist($id_objet, $statut, $id_rubrique, $type) {
+function inc_puce_statut_dist($id_objet, $statut, $id_rubrique, $type, $ajax=false) {
 	// le function_exists n'est utile qu'aux greffons
 	if (function_exists($f = "puce_statut_$type"))
-		return $f($id_objet, $statut, $id_rubrique, $type);
+		return $f($id_objet, $statut, $id_rubrique, $type, $ajax);
 	else
 		return "<img src='"._DIR_IMG_PACK. "$type-24.gif" . "' />";
 }
 
 
 // http://doc.spip.org/@puce_statut_auteur
-function puce_statut_auteur($id, $statut, $id_rubrique, $type) {
+function puce_statut_auteur($id, $statut, $id_rubrique, $type, $ajax='') {
 	return bonhomme_statut(array('statut' => $statut));
 }
 
@@ -55,12 +55,12 @@ function bonhomme_statut($row) {
 
 
 // http://doc.spip.org/@puce_statut_mot
-function puce_statut_mot($id, $statut, $id_rubrique, $type) {
+function puce_statut_mot($id, $statut, $id_rubrique, $type, $ajax='') {
 	return "<img src='"._DIR_IMG_PACK. 'petite-cle.gif' . "' />";
 }
 
 // http://doc.spip.org/@puce_statut_rubrique
-function puce_statut_rubrique($id, $statut, $id_rubrique, $type) {
+function puce_statut_rubrique($id, $statut, $id_rubrique, $type, $ajax='') {
 
 	return "<img src='"._DIR_IMG_PACK. 'rubrique-12.gif' . "' />";
 }
@@ -117,7 +117,7 @@ function puce_statut_article($id, $statut, $id_rubrique, $type='article', $ajax
 	  $over ='';
 	else {
 
-	  $action = generer_url_ecrire('puce_statut_article',"",true);
+	  $action = generer_url_ecrire('puce_statut',"",true);
 	  $action = "if (!this.puce_loaded) { this.puce_loaded = true; prepare_selec_statut('$nom', '$type', $id, '$action'); }";
 	  $over = "\nonmouseover=\"$action\"";
 	}
@@ -128,7 +128,7 @@ function puce_statut_article($id, $statut, $id_rubrique, $type='article', $ajax
 }
 
 // http://doc.spip.org/@puce_statut_breve
-function puce_statut_breve($id, $statut, $id_rubrique, $type) {
+function puce_statut_breve($id, $statut, $id_rubrique, $type, $ajax='') {
 	global $lang_objet;
 
 	$lang_dir = lang_dir($lang_objet);
@@ -182,7 +182,7 @@ function puce_statut_breve($id, $statut, $id_rubrique, $type) {
 }
 
 // http://doc.spip.org/@puce_statut_site
-function puce_statut_site($id_site, $statut, $id_rubrique, $type){
+function puce_statut_site($id_site, $statut, $id_rubrique, $type, $ajax=''){
 
 	$droit = autoriser('publierdans','rubrique',$id_rubrique)
 		? 'anim'
@@ -206,7 +206,7 @@ function puce_statut_site($id_site, $statut, $id_rubrique, $type){
 }
 
 // http://doc.spip.org/@puce_statut_syndic_article
-function puce_statut_syndic_article($id_syndic, $statut, $id_rubrique, $type){
+function puce_statut_syndic_article($id_syndic, $statut, $id_rubrique, $type, $ajax=''){
 	if ($statut=='publie') {
 		$puce='puce-verte.gif';
 	}
diff --git a/ecrire/inc/referencer_traduction.php b/ecrire/inc/referencer_traduction.php
index 3383e29bc17ffdfb133b71f6beda6aeaeb2e84ba..b83a4ce530cafa1dda00e5cc86cd370df3ba15f2 100644
--- a/ecrire/inc/referencer_traduction.php
+++ b/ecrire/inc/referencer_traduction.php
@@ -150,7 +150,7 @@ function articles_traduction($id_article, $id_trad)
 	$result_trad = spip_query("SELECT id_article, id_rubrique, titre, lang, statut FROM spip_articles WHERE id_trad = $id_trad");
 	
 	$table= array();
-
+	$puce_statut = charger_fonction('puce_statut', 'inc');
 	while ($row = spip_fetch_array($result_trad)) {
 		$vals = array();
 		$id_article_trad = $row["id_article"];
@@ -163,7 +163,7 @@ function articles_traduction($id_article, $id_trad)
 		$lang_dir = lang_dir($lang_trad);
 		$titre_trad = "<span dir='$lang_dir'>$titre_trad</span>";
 
-		$vals[] = puce_statut($statut_trad, " class='puce'");
+		$vals[] = $puce_statut($id_article_trad, $statut_trad, $id_rubrique_trad, 'article');
 		
 		if ($id_article_trad == $id_trad) {
 			$vals[] = http_img_pack('langues-12.gif', "", " class='lang'");
diff --git a/ecrire/public/compiler.php b/ecrire/public/compiler.php
index 10c2b5db5f9d2c608ea180bcd3a8e58b810928e6..559bfcd473c63a5567eac0fc75e1dcbf496b59e6 100644
--- a/ecrire/public/compiler.php
+++ b/ecrire/public/compiler.php
@@ -143,10 +143,34 @@ function calculer_boucle($id_boucle, &$boucles) {
 
 // http://doc.spip.org/@calculer_boucle_rec
 function calculer_boucle_rec($id_boucle, &$boucles) {
-	$nom = $boucles[$id_boucle]->param[0];
-	return "\n\t\$save_numrows = (\$Numrows['$nom']);"
-	. "\n\t\$t0 = " . $boucles[$id_boucle]->return . ";"
-	. "\n\t\$Numrows['$nom'] = (\$save_numrows);";
+
+  // Moche. Faut revoir la structure de donnees 
+	$x = $boucles[$id_boucle];
+	$l = $x->param;
+	$nom = array_shift($l);
+	$x->param = $l;
+
+	$l = argumenter_inclure($x,
+				array('id_mere' => $id_boucle),
+				$boucles, $id_boucle, false);
+
+	foreach($l as $k=>$v) {
+	  $l[$k] = preg_replace(',(Pile\[)([^[]]*)(\]\[' . "'$k'),",
+				'\1($savenum ? $SP-1 :  \2)\3',
+				substr($v,strpos($v,'=>')+2));
+	}
+	$save = $set = $rest = '';
+	foreach($l as $k=>$v) {
+	  $save .= "\n\t\$save['$k']=\$Pile[\$SP]['$k'];";
+	  $set .= "\n\t\$Pile[\$SP]['$k'] = $v;";
+	  $rest .= "\n\t\$Pile[\$SP]['$k'] = \$save['$k'];";
+	}
+
+	return "\n\tstatic \$savenum=array();spip_log(\"recur \$SP \" . \$Pile[\$SP-1]['prefixe'] );
+	$save
+$set\n\tarray_push(\$savenum, \$Numrows['$nom']);"
+	. "\n\t\$t0 = " . $boucles[$id_boucle]->return . ";\n\nspip_log(\"----recur \$SP $nom\");"
+	. "\n\t\$Numrows['$nom'] = array_pop(\$savenum);$rest";
 }
 
 // compil d'une boucle non recursive. 
@@ -457,6 +481,7 @@ function calculer_parties($boucles, $id_boucle) {
 
 // http://doc.spip.org/@calculer_liste
 function calculer_liste($tableau, $descr, &$boucles, $id_boucle='') {
+
 	if (!$tableau) return "''";
 	if (!isset($descr['niv'])) $descr['niv'] = 0;
 	$codes = compile_cas($tableau, $descr, $boucles, $id_boucle);
@@ -538,6 +563,7 @@ function compile_cas($tableau, $descr, &$boucles, $id_boucle) {
 			  str_replace("-","_", $nom) . $descr['nom'] .
 			  '($Cache, $Pile, $doublons, $Numrows, $SP)';
 			$commentaire= "?$nom";
+			spip_log("%%% $code");
 			$avant = calculer_liste($p->avant,
 				$newdescr, $boucles, $id_boucle);
 			$apres = calculer_liste($p->apres,
@@ -606,6 +632,7 @@ function compile_cas($tableau, $descr, &$boucles, $id_boucle) {
 			}
 
 		}
+
 		if ($code != "''")
 			$codes[]= (($mode == 'validation') ?
 				"array(" . $p->ligne . ", '$commentaire', $code)"
@@ -728,6 +755,7 @@ function public_compiler_dist($squelette, $nom, $gram, $sourcefile) {
 		if ($boucle->type_requete == 'boucle') {
 			$boucles[$id]->descr = &$descr;
 			$rec = &$boucles[$boucle->param[0]];
+			spip_log("boucle%%%%%%%%% $id " . $rec->type);
 			if (!$rec) {
 				return array(_T('zbug_info_erreur_squelette'),
 						($boucle->param[0]
diff --git a/ecrire/public/phraser_html.php b/ecrire/public/phraser_html.php
index cd231e0ac6cc087ff0d9de8f4b2e85c05f079265..44861af628d04ce267f3ebf338328f1aecda2643 100644
--- a/ecrire/public/phraser_html.php
+++ b/ecrire/public/phraser_html.php
@@ -590,20 +590,25 @@ function public_phraser_html($texte, $id_parent, &$boucles, $nom, $ligne=1) {
 
 		if ($soustype == 'sites') $soustype = 'syndication' ; # alias
 		      
+		phraser_args($milieu,">","",$all_res,$result);
+		$params = substr($milieu,0,strpos($milieu,$result->apres));
+		$milieu = substr($result->apres,1);
+		$result->apres = "";
+
 		//
 		// analyser les criteres et distinguer la boucle recursive
 		//
 		if (strncmp($soustype, TYPE_RECURSIF, strlen(TYPE_RECURSIF)) == 0) {
 			$result->type_requete = TYPE_RECURSIF;
-			$result->param[0] = substr($type, strlen(TYPE_RECURSIF));
-			$milieu = substr($milieu, strpos($milieu, '>')+1);
-			$params = "";
+			$params = phraser_arguments_inclure($result);
+			$params = $params->param;
+
+			array_unshift($params,
+				      substr($type, strlen(TYPE_RECURSIF)));
+			$result->param = $params;
+#			$milieu = substr($milieu, strpos($milieu, '>')+1);
 		} else {
 			$result->type_requete = $soustype;
-			phraser_args($milieu,">","",$all_res,$result);
-			$params = substr($milieu,0,strpos($milieu,$result->apres));
-			$milieu = substr($result->apres,1);
-			$result->apres = "";
 			phraser_criteres($result->param, $result);
 		}
 
diff --git a/ecrire/public/references.php b/ecrire/public/references.php
index b4ce823b28b5775aba25a15e5d89a35a424077bc..72eaecf0044a2b0953b45b17fe84ef8c64dd493b 100644
--- a/ecrire/public/references.php
+++ b/ecrire/public/references.php
@@ -110,6 +110,7 @@ function index_tables_en_pile($idb, $nom_champ, &$boucles) {
 	$r = $boucles[$idb]->type_requete;
 	$s = $boucles[$idb]->sql_serveur;
 
+	if ($r == 'boucle') return array();
 	$desc= description_type_requete($r, $s);
 
 	if(!$desc) {