Line 143... |
Line 143... |
143 |
$widget['donnees']['nom_sci_espece_defaut'] = $nom['nom_sci'];
|
143 |
$widget['donnees']['nom_sci_espece_defaut'] = $nom['nom_sci'];
|
144 |
$widget['donnees']['infos_espece'] = $this->array2js($nom, true);
|
144 |
$widget['donnees']['infos_espece'] = $this->array2js($nom, true);
|
145 |
}
|
145 |
}
|
146 |
}
|
146 |
}
|
147 |
if ($this->projet != 'defaut' || $this->projetASquelette()) {
|
147 |
if ($this->projet != 'defaut' || $this->projetASquelette()) {
|
148 |
if ($this->projet == 'florileges' || $this->projet == 'sauvages') {
|
148 |
if ($this->projet == 'florileges' || $this->projet == 'sauvages' || $this->projet == 'arbres-tetards') {
|
149 |
$widget['donnees']['taxons'] = $this->recupererListeNoms();
|
149 |
$widget['donnees']['taxons'] = $this->recupererListeNoms();
|
150 |
} else {
|
150 |
} else {
|
151 |
$widget['donnees']['taxons'] = $this->recupererListeNomsSci();
|
151 |
$widget['donnees']['taxons'] = $this->recupererListeNomsSci();
|
152 |
}
|
152 |
}
|
153 |
$widget['donnees']['milieux'] = $this->parserMilieux();
|
153 |
$widget['donnees']['milieux'] = $this->parserMilieux();
|
Line 287... |
Line 287... |
287 |
$url_service_infos = sprintf($this->config['chemins']['infosTaxonUrl'], $this->NS_PROJET, $num_nom);
|
287 |
$url_service_infos = sprintf($this->config['chemins']['infosTaxonUrl'], $this->NS_PROJET, $num_nom);
|
288 |
$infos = json_decode(file_get_contents($url_service_infos));
|
288 |
$infos = json_decode(file_get_contents($url_service_infos));
|
289 |
// trop de champs injectés dans les infos espèces peut
|
289 |
// trop de champs injectés dans les infos espèces peut
|
290 |
// faire planter javascript
|
290 |
// faire planter javascript
|
291 |
$champs_a_garder = array('id', 'nom_sci','nom_sci_complet',
|
291 |
$champs_a_garder = array('id', 'nom_sci','nom_sci_complet',
|
292 |
'famille','nom_retenu.id', 'nom_retenu.libelle', 'num_taxonomique');
|
292 |
'famille','nom_retenu.id', 'nom_retenu.libelle', 'num_taxonomique');
|
293 |
$resultat = array();
|
293 |
$resultat = array();
|
294 |
if (isset($infos) && !empty($infos)) {
|
294 |
if (isset($infos) && !empty($infos)) {
|
295 |
$infos = (array)$infos;
|
295 |
$infos = (array)$infos;
|
296 |
if(isset($infos['nom_sci']) && $infos['nom_sci'] != '') {
|
296 |
if (isset($infos['nom_sci']) && $infos['nom_sci'] != '') {
|
297 |
$resultat = array_intersect_key($infos, array_flip($champs_a_garder));
|
297 |
$resultat = array_intersect_key($infos, array_flip($champs_a_garder));
|
298 |
$resultat['retenu'] = ($infos['id'] == $infos['nom_retenu.id']) ? "true" : "false";
|
298 |
$resultat['retenu'] = ($infos['id'] == $infos['nom_retenu.id']) ? "true" : "false";
|
299 |
}
|
299 |
}
|
300 |
}
|
300 |
}
|
301 |
return $resultat;
|
301 |
return $resultat;
|