| Line 169... |
Line 169... |
| 169 |
$this->envoyer();
|
169 |
$this->envoyer();
|
| 170 |
return;
|
170 |
return;
|
| 171 |
}
|
171 |
}
|
| 172 |
try {
|
172 |
try {
|
| 173 |
// Vérification des tables à vraiment mettre à jour en fonction des données passées.
|
173 |
// Vérification des tables à vraiment mettre à jour en fonction des données passées.
|
| - |
|
174 |
if( (! @$params['cs_latitude'] || ! @$params['cs_longitude']) &&
|
| - |
|
175 |
(@$params['cs_adresse_01'] || @$params['cs_code_postal'] || @$params['cs_ville']) ) {
|
| - |
|
176 |
$lonlat = array();
|
| - |
|
177 |
if(Coel::coordGuess(Coel::addrReStruct($params), $lonlat)) {
|
| - |
|
178 |
$params['cs_latitude'] = $lonlat['lat'];
|
| - |
|
179 |
$params['cs_longitude'] = $lonlat['lon'];
|
| - |
|
180 |
}
|
| - |
|
181 |
}
|
| - |
|
182 |
|
| 174 |
$tables_a_modifier = $this->recupererTablesAModifier($params);
|
183 |
$tables_a_modifier = $this->recupererTablesAModifier($params);
|
| 175 |
reset($tables_a_modifier);
|
184 |
reset($tables_a_modifier);
|
| 176 |
|
185 |
|
| 177 |
$id_structure = null;
|
186 |
$id_structure = null;
|
| 178 |
while (list($table_id, $table) = each($tables_a_modifier)) {
|
187 |
while (list($table_id, $table) = each($tables_a_modifier)) {
|
| 179 |
if (is_null($table['champs'])) continue;
|
188 |
if (is_null($table['champs'])) continue;
|
| 180 |
if ($this->avoirCleComplete($table)) {
|
189 |
if ($this->avoirCleComplete($table)) {
|
| 181 |
$this->mettreAJourAvecCle($id_utilisateur, $id_session, $table_id, $table);
|
190 |
$this->mettreAJourAvecCle($id_utilisateur, $id_session, $table_id, $table);
|
| Line 192... |
Line 201... |
| 192 |
$tables_a_modifier[122]['champs_valeurs_brut']['csc_id_structure'] = $id_structure;
|
201 |
$tables_a_modifier[122]['champs_valeurs_brut']['csc_id_structure'] = $id_structure;
|
| 193 |
$tables_a_modifier[122]['champs_valeurs_protege']['csc_id_structure'] = $this->bdd->quote($id_structure);
|
202 |
$tables_a_modifier[122]['champs_valeurs_protege']['csc_id_structure'] = $this->bdd->quote($id_structure);
|
| 194 |
$tables_a_modifier[123]['champs_valeurs_id']['csv_id_structure'] = $id_structure;
|
203 |
$tables_a_modifier[123]['champs_valeurs_id']['csv_id_structure'] = $id_structure;
|
| 195 |
$tables_a_modifier[123]['champs_valeurs_brut']['csv_id_structure'] = $id_structure;
|
204 |
$tables_a_modifier[123]['champs_valeurs_brut']['csv_id_structure'] = $id_structure;
|
| 196 |
$tables_a_modifier[123]['champs_valeurs_protege']['csv_id_structure'] = $this->bdd->quote($id_structure);
|
205 |
$tables_a_modifier[123]['champs_valeurs_protege']['csv_id_structure'] = $this->bdd->quote($id_structure);
|
| 197 |
|
206 |
|
| 198 |
// Historisation (Ajout des méta-données)
|
207 |
// Historisation (Ajout des méta-données)
|
| 199 |
$etat = 1; // Ajout
|
208 |
$etat = 1; // Ajout
|
| 200 |
$cle = $this->recupererCle($table);
|
209 |
$cle = $this->recupererCle($table);
|
| 201 |
$info = $this->creerXmlHisto($table['champs_valeurs_brut']);
|
210 |
$info = $this->creerXmlHisto($table['champs_valeurs_brut']);
|
| 202 |
$id_meta = $this->historiser($table_id, $cle, $info, $id_utilisateur, $etat, $id_session);
|
211 |
$id_meta = $this->historiser($table_id, $cle, $info, $id_utilisateur, $etat, $id_session);
|