3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2017 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
13 if (!defined('_ECRIRE_INC_VERSION')) {
17 function lister_traductions($id_trad, $objet) {
18 $table_objet_sql = table_objet_sql($objet);
19 $primary = id_table_objet($objet);
21 $select = "$primary as id,lang";
22 $where = 'id_trad=' . intval($id_trad);
23 $trouver_table = charger_fonction('trouver_table','base');
24 $desc = $trouver_table($table_objet_sql);
25 if (isset($desc['field']['statut'])) {
27 $where .= ' AND statut!='.sql_quote('poubelle');
30 $rows = sql_allfetsel($select, $table_objet_sql, $where);