diff --git a/ecrire/inc/export.php b/ecrire/inc/export.php index bc193ebee6e5d92e3867b1b2efc03efa7a79a6b3..bc8e5b536d1c2b6663abac5f6ba141a39b91db35 100644 --- a/ecrire/inc/export.php +++ b/ecrire/inc/export.php @@ -13,7 +13,7 @@ if (!defined("_ECRIRE_INC_VERSION")) return; include_spip('base/serial'); include_spip('base/auxiliaires'); -include_spip('public/interfaces'); // pour table_des_tables +include_spip('public/interfaces'); // pour table_jointures $GLOBALS['version_archive'] = '1.3'; // NB: Ce fichier peut ajouter des tables (old-style) @@ -64,7 +64,6 @@ function export_all_list_tables() global $EXPORT_tables_noexport; global $tables_principales; global $tables_auxiliaires; - global $table_des_tables; global $tables_jointures; // on construit un index des tables de liens diff --git a/ecrire/inc/import.php b/ecrire/inc/import.php index 4061d2b1c5431868e1a1b4986b04915bcf003258..e84cc13b99b7f54945c533042c85c31eb284637a 100644 --- a/ecrire/inc/import.php +++ b/ecrire/inc/import.php @@ -375,7 +375,6 @@ function import_table_choix($request) global $IMPORT_tables_noimport; global $tables_principales; global $tables_auxiliaires; - global $table_des_tables; global $tables_jointures; if (!isset($IMPORT_tables_noimport)) $IMPORT_tables_noimport=array(); diff --git a/ecrire/public/boucles.php b/ecrire/public/boucles.php index 79aa71f0aaf85257b3d2357baee67c6213bdab33..808e7bb2eea6ba02cf54deae9d687b2dc6b32115 100644 --- a/ecrire/public/boucles.php +++ b/ecrire/public/boucles.php @@ -20,21 +20,8 @@ if (!defined("_ECRIRE_INC_VERSION")) return; // // Boucle standard, sans condition rajoutee // -// http://doc.spip.org/@boucle_DEFAUT_dist +// http://doc.spip.org/@boucle_DEFAUT_dist function boucle_DEFAUT_dist($id_boucle, &$boucles) { - global $table_des_tables, $tables_auxiliaires; - $boucle = &$boucles[$id_boucle]; - $type = $boucle->type_requete; - ; - if (isset($table_des_tables[$type])) - // les tables principales de spip ont un prefixe et un surnom - $boucle->from[$table_des_tables[$type]] = 'spip_' . $type ; - else if (isset($tables_auxiliaires['spip_' .$type])) - // les tables auxiliaires de spip ont un prefixe et pas de surnom - $boucle->from[$type] = 'spip_' . $type ; - // table hors SPIP - else $boucle->from[$type] = $type; - return calculer_boucle($id_boucle, $boucles); } diff --git a/ecrire/public/compiler.php b/ecrire/public/compiler.php index 6b179b3c5e0728d3ccc02f0238c6d0d9d6060287..0f2db1864abc05a5a54ba6291fbde7f3bc573ee5 100644 --- a/ecrire/public/compiler.php +++ b/ecrire/public/compiler.php @@ -700,7 +700,7 @@ function public_compiler_dist($squelette, $nom, $gram, $sourcefile, $connect='') $boucles[$id]->sql_serveur = $connect; $show = trouver_table($type, $boucles[$id]); if ($show) { - $nom_table = $show['table']; + $boucle->from[$type] = $nom_table = $show['table']; $boucles[$id]->id_table = $show['id_table']; $boucles[$id]->primary = $show['key']["PRIMARY KEY"]; $boucles[$id]->descr = &$descr;