X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=www%2Fecrire%2Finc%2Fprecharger_objet.php;h=f607d38fd6623f1806e3931052216c1f19a94321;hb=42e19314b95163d09c948850637de4b048c84020;hp=d11a381ebfc05a28866f335f94e152f93718a5a9;hpb=c6122d70c119ce708aae1502df2448f1ced07a92;p=lhc%2Fweb%2Fwww.git diff --git a/www/ecrire/inc/precharger_objet.php b/www/ecrire/inc/precharger_objet.php index d11a381e..f607d38f 100644 --- a/www/ecrire/inc/precharger_objet.php +++ b/www/ecrire/inc/precharger_objet.php @@ -50,7 +50,7 @@ function precharger_objet($type, $id_objet, $id_rubrique = 0, $lier_trad = 0, $c // si l'objet existe deja, on retourne simplement ses valeurs if (is_numeric($id_objet)) { - return sql_fetsel("*", $table, "$_id_objet=$id_objet"); + return sql_fetsel("*", $table, "$_id_objet=".intval($id_objet)); } // ici, on demande une creation. @@ -133,7 +133,7 @@ function precharger_traduction_objet($type, $id_objet, $id_rubrique = 0, $lier_t $_id_objet = id_table_objet($table); // Recuperer les donnees de l'objet original - $row = sql_fetsel("*", $table, "$_id_objet=$lier_trad"); + $row = sql_fetsel("*", $table, "$_id_objet=".intval($lier_trad)); if ($row) { include_spip('inc/filtres'); $row[$champ_titre] = filtrer_entites(objet_T($type, 'info_nouvelle_traduction')) . ' ' . $row[$champ_titre]; @@ -172,12 +172,12 @@ function precharger_traduction_objet($type, $id_objet, $id_rubrique = 0, $lier_t $id_parent = 0; } else { // on cherche une rubrique soeur dans la bonne langue - $row_rub = sql_fetsel("id_parent", "spip_rubriques", "id_rubrique=$id_rubrique"); + $row_rub = sql_fetsel("id_parent", "spip_rubriques", "id_rubrique=".intval($id_rubrique)); $id_parent = $row_rub['id_parent']; } $row_rub = sql_fetsel("id_rubrique", "spip_rubriques", - "lang='" . $GLOBALS['spip_lang'] . "' AND id_parent=$id_parent"); + "lang='" . $GLOBALS['spip_lang'] . "' AND id_parent=".intval($id_parent)); if ($row_rub) { $row['id_rubrique'] = $row_rub['id_rubrique']; }