| Line 93... |
Line 93... |
| 93 |
$obsAAjouter['nt'] = isset($obs['num_taxon']) ? $obs['num_taxon'] : null;
|
93 |
$obsAAjouter['nt'] = isset($obs['num_taxon']) ? $obs['num_taxon'] : null;
|
| 94 |
$obsAAjouter['famille'] = isset($obs['famille']) ? $obs['famille'] : null;
|
94 |
$obsAAjouter['famille'] = isset($obs['famille']) ? $obs['famille'] : null;
|
| 95 |
$obsAAjouter['nom_referentiel'] = isset($obs['referentiel']) ? $obs['referentiel'] : null;
|
95 |
$obsAAjouter['nom_referentiel'] = isset($obs['referentiel']) ? $obs['referentiel'] : null;
|
| Line 96... |
Line 96... |
| 96 |
|
96 |
|
| 97 |
$obsAAjouter['date_observation'] = $this->transormerDateFrVersMysql($obs['date']);
|
97 |
$obsAAjouter['date_observation'] = $this->transormerDateFrVersMysql($obs['date']);
|
| Line 98... |
Line 98... |
| 98 |
$obsAAjouter['commentaire'] = $obs['notes'];
|
98 |
$obsAAjouter['commentaire'] = isset($obs['notes']) ? $obs['notes'] : null;
|
| 99 |
|
99 |
|
| 100 |
$obsAAjouter['zone_geo'] = $obs['commune_nom'];
|
100 |
$obsAAjouter['zone_geo'] = $obs['commune_nom'];
|
| 101 |
$obsAAjouter['ce_zone_geo'] = 'INSEE-C:'.$obs['commune_code_insee'];
|
101 |
$obsAAjouter['ce_zone_geo'] = 'INSEE-C:'. (isset($obs['commune_code_insee']) ? $obs['commune_code_insee'] : '');
|
| 102 |
$obsAAjouter['lieudit'] = isset($obs['lieudit']) ? $obs['lieudit'] : null;
|
102 |
$obsAAjouter['lieudit'] = isset($obs['lieudit']) ? $obs['lieudit'] : null;
|
| 103 |
$obsAAjouter['station'] = isset($obs['station']) ? $obs['station'] : null;
|
103 |
$obsAAjouter['station'] = isset($obs['station']) ? $obs['station'] : null;
|
| 104 |
$obsAAjouter['milieu'] = isset($obs['milieu']) ? $obs['milieu'] : null;
|
104 |
$obsAAjouter['milieu'] = isset($obs['milieu']) ? $obs['milieu'] : null;
|
| Line 228... |
Line 228... |
| 228 |
} else {
|
228 |
} else {
|
| 229 |
$msg = 'ok';
|
229 |
$msg = 'ok';
|
| 230 |
}
|
230 |
}
|
| 231 |
// renvoi des infos d'images (id, nom) ordonnées, en plus des infos obs.
|
231 |
// renvoi des infos d'images (id, nom) ordonnées, en plus des infos obs.
|
| 232 |
$infosImages = array();
|
232 |
$infosImages = array();
|
| - |
|
233 |
if (! empty($img_a_taguer_ids_noms)) {
|
| 233 |
foreach ($img_a_taguer_ids_noms as $id => $nom) {
|
234 |
foreach ($img_a_taguer_ids_noms as $id => $nom) {
|
| 234 |
$infosImages[] = array(
|
235 |
$infosImages[] = array(
|
| 235 |
'id' => $id,
|
236 |
'id' => $id,
|
| 236 |
'nom' => $nom
|
237 |
'nom' => $nom
|
| 237 |
);
|
238 |
);
|
| - |
|
239 |
}
|
| 238 |
}
|
240 |
}
|
| 239 |
$retour = (object) array(
|
241 |
$retour = (object) array(
|
| 240 |
'msg' => $msg,
|
242 |
'msg' => $msg,
|
| 241 |
'id' => $idNouvelleObs,
|
243 |
'id' => $idNouvelleObs,
|
| 242 |
'images' => $infosImages
|
244 |
'images' => $infosImages
|