diff --git a/ecrire/inc/prepare_recherche.php b/ecrire/inc/prepare_recherche.php
index 1746a7789e6adef80d82587dbb6eac52b893dd3f..2a44141851a9a336fb5cbbeae2c7b8c1113f793e 100644
--- a/ecrire/inc/prepare_recherche.php
+++ b/ecrire/inc/prepare_recherche.php
@@ -18,7 +18,7 @@ include_spip('inc/rechercher');
 // Preparer les listes id_article IN (...) pour les parties WHERE
 // et points =  des requetes du moteur de recherche
 // http://doc.spip.org/@inc_prepare_recherche_dist
-function inc_prepare_recherche_dist($recherche, $primary = 'id_article', $id_table='articles',$nom_table='spip_articles', $cond=false) {
+function inc_prepare_recherche_dist($recherche, $primary = 'id_article', $id_table='articles',$unused='', $cond=false) {
 	static $cache = array();
 	static $fcache = array();
 
diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php
index 43000ce685f2fc2062171de95560d4706fa67ad7..8c96685455fc2a5139062f3a9be75091ac1f072c 100644
--- a/ecrire/inc/utils.php
+++ b/ecrire/inc/utils.php
@@ -589,8 +589,8 @@ function id_table_objet($type) {
 // http://doc.spip.org/@table_jointure
 function table_jointure($x, $y) {
 	include_spip('public/interfaces');
-	if ($table = $GLOBALS['tables_jointures']['spip_' . table_objet($y)][id_table_objet($x)]
-	OR $table = $GLOBALS['tables_jointures']['spip_' . table_objet($x)][id_table_objet($y)])
+	if ($table = $GLOBALS['tables_jointures'][table_objet_sql($y)][id_table_objet($x)]
+	OR $table = $GLOBALS['tables_jointures'][table_objet_sql($x)][id_table_objet($y)])
 		return $table;
 }
 
diff --git a/ecrire/public/criteres.php b/ecrire/public/criteres.php
index 8a0eb9daac86077da8e8d3bfa678be33575148cc..1d95516b7f1a6b8844a4e75c9edb647086b869e6 100644
--- a/ecrire/public/criteres.php
+++ b/ecrire/public/criteres.php
@@ -137,11 +137,8 @@ function critere_fragment_dist($idb, &$boucles, $crit) {
 // http://www.spip.net/@recherche
 // http://doc.spip.org/@critere_recherche_dist
 function critere_recherche_dist($idb, &$boucles, $crit) {
-	global $table_des_tables;
+
 	$boucle = &$boucles[$idb];
-	$t = $boucle->id_table;
-	if (in_array($t,$table_des_tables))
-		$t = "spip_$t";
 
 	if (isset($crit->param[0]))
 		$quoi = calculer_liste($crit->param[0], array(), $boucles, $boucles[$idb]->id_parent);
@@ -152,7 +149,7 @@ function critere_recherche_dist($idb, &$boucles, $crit) {
 	$boucle->hash = '
 	// RECHERCHE
 	$prepare_recherche = charger_fonction(\'prepare_recherche\', \'inc\');
-	list($rech_select, $rech_where) = $prepare_recherche('.$quoi.', "'.$boucle->primary.'", "'.$boucle->id_table.'", "'.$t.'", "'.$crit->cond.'");
+	list($rech_select, $rech_where) = $prepare_recherche('.$quoi.', "'.$boucle->primary.'", "'.$boucle->id_table.'", "", "'.$crit->cond.'");
 	';
 
 	// Sauf si le critere est conditionnel {recherche ?}
@@ -236,7 +233,7 @@ function critere_meme_parent_dist($idb, &$boucles, $crit) {
 // http://www.spip.net/@branche
 // http://doc.spip.org/@critere_branche_dist
 function critere_branche_dist($idb, &$boucles, $crit) {
-	global $table_des_tables;
+
 	$not = $crit->not;
 	$boucle = &$boucles[$idb];