diff --git a/base/soyezcreateurs.php b/base/soyezcreateurs.php index 76f8d785502c3212d06f3d2a4ce534cf35289e7a..b58adbe12a306e08047d219270e9b0cf57df6d80 100644 --- a/base/soyezcreateurs.php +++ b/base/soyezcreateurs.php @@ -144,15 +144,15 @@ function create_groupe($titre, $descriptif='', $texte='', $unseul='non', $obliga spip_log("1. (create_groupe) pret a creer groupe : titre = $titre. retour de find_groupe = $id_groupe", _LOG_DEBUG); if ($id_groupe == 0) { $set = array( - "id_groupe" => '', - "titre" => $titre, - "descriptif" => $descriptif, - "texte" => $texte, - "unseul" => $unseul, - "obligatoire" => $obligatoire, - "tables_liees" => $tables_liees, - "minirezo" => $minirezo, - "comite" => $comite, + "id_groupe" => '', + "titre" => $titre, + "descriptif" => $descriptif, + "texte" => $texte, + "unseul" => $unseul, + "obligatoire" => $obligatoire, + "tables_liees" => $tables_liees, + "minirezo" => $minirezo, + "comite" => $comite, "forum" => $forum ); $id_insert = objet_inserer('groupes_mots', $id_groupe, $set); @@ -193,14 +193,14 @@ function remplacer_groupe($titre, $descriptif, $texte, $unseul, $obligatoire, $t include_spip('action/editer_objet'); $id_groupe = id_groupe($titre); $set = array( - "titre" => $titre, - "descriptif" => $descriptif, - "texte" => $texte, - "unseul" => $unseul, - "obligatoire" => $obligatoire, - "tables_liees" => $tables_liees, - "minirezo" => $minirezo, - "comite" => $comite, + "titre" => $titre, + "descriptif" => $descriptif, + "texte" => $texte, + "unseul" => $unseul, + "obligatoire" => $obligatoire, + "tables_liees" => $tables_liees, + "minirezo" => $minirezo, + "comite" => $comite, "forum" => $forum ); objet_modifier('groupes_mots', $id_groupe, $set); @@ -238,7 +238,15 @@ function create_mot($groupe, $mot, $descriptif='', $texte='') { $find_mot = find_mot($mot, $id_groupe); if ($find_mot == 0) { spip_log("1. (create_mot) debut create_mot. mot inexistant donc creation : $id_groupe - $mot", _LOG_DEBUG); - $id_mot = objet_inserer('mots', $id_groupe, array("id_mot" => '', "titre" => $mot, "descriptif" => $descriptif, "texte" => $texte, "id_groupe" => $id_groupe, "type" => $groupe)); + $set = array( + "id_mot" => '', + "titre" => $mot, + "descriptif" => $descriptif, + "texte" => $texte, + "id_groupe" => $id_groupe, + "type" => $groupe + ); + $id_mot = objet_inserer('mots', $id_groupe, $set); spip_log("2. (create_mot) mot cle $mot insere sous l'id $id_mot dans la table avec groupe = $id_groupe", _LOG_DEBUG); } else if ($find_mot > 0) { @@ -255,6 +263,13 @@ function create_mot($groupe, $mot, $descriptif='', $texte='') { //fonction qui permet de mettre à jour un mot clé function remplacer_mot($id_mot, $mot, $descriptif, $texte, $id_groupe, $groupe) { include_spip('action/editer_objet'); + $set = array( + "titre" => $mot, + "descriptif" => $descriptif, + "texte" => $texte, + "id_groupe" => $id_groupe, + "type" => $groupe + ); objet_modifier('mots', $id_mot, $set); return true; }