Line 115... |
Line 115... |
115 |
$widget['donnees']['logo'] = isset($_GET['logo']) ? $_GET['logo'] : 'defaut';
|
115 |
$widget['donnees']['logo'] = isset($_GET['logo']) ? $_GET['logo'] : 'defaut';
|
116 |
$widget['donnees']['titre'] = isset($_GET['titre']) ? $_GET['titre'] : 'defaut';
|
116 |
$widget['donnees']['titre'] = isset($_GET['titre']) ? $_GET['titre'] : 'defaut';
|
117 |
$widget['donnees']['titre'] = ($widget['donnees']['titre'] == '0') ? '' : $widget['donnees']['titre'];
|
117 |
$widget['donnees']['titre'] = ($widget['donnees']['titre'] == '0') ? '' : $widget['donnees']['titre'];
|
Line 118... |
Line 118... |
118 |
|
118 |
|
119 |
// cas du projet par défaut ou bien d'un projet n'ayant pas de squelette spécifique
|
119 |
// cas du projet par défaut ou bien d'un projet n'ayant pas de squelette spécifique
|
120 |
if ($this->projet == 'defaut' || $this->projet == 'florileges' || !$this->projetASquelette()) {
|
120 |
if ($this->projet == 'defaut' || $this->projet == 'florileges' || $this->projet == 'sauvages' || !$this->projetASquelette()) {
|
121 |
$urlWsNsTpl = $this->config['chemins']['baseURLServicesEfloreTpl'];
|
121 |
$urlWsNsTpl = $this->config['chemins']['baseURLServicesEfloreTpl'];
|
122 |
$urlWsNs = sprintf($urlWsNsTpl, self::EFLORE_API_VERSION, $this->NS_PROJET, self::WS_NOM);
|
122 |
$urlWsNs = sprintf($urlWsNsTpl, self::EFLORE_API_VERSION, $this->NS_PROJET, self::WS_NOM);
|
123 |
$urlWsNsSansRef = sprintf($urlWsNsTpl, self::EFLORE_API_VERSION, '{referentiel}', self::WS_NOM);
|
123 |
$urlWsNsSansRef = sprintf($urlWsNsTpl, self::EFLORE_API_VERSION, '{referentiel}', self::WS_NOM);
|
124 |
$widget['donnees']['url_ws_autocompletion_ns'] = $urlWsNs;
|
124 |
$widget['donnees']['url_ws_autocompletion_ns'] = $urlWsNs;
|
Line 271... |
Line 271... |
271 |
private function executerChargementInfosTaxon($num_nom) {
|
271 |
private function executerChargementInfosTaxon($num_nom) {
|
272 |
$url_service_infos = sprintf($this->config['chemins']['infosTaxonUrl'], $this->NS_PROJET, $num_nom);
|
272 |
$url_service_infos = sprintf($this->config['chemins']['infosTaxonUrl'], $this->NS_PROJET, $num_nom);
|
273 |
$infos = json_decode(file_get_contents($url_service_infos));
|
273 |
$infos = json_decode(file_get_contents($url_service_infos));
|
274 |
// trop de champs injectés dans les infos espèces peut
|
274 |
// trop de champs injectés dans les infos espèces peut
|
275 |
// faire planter javascript
|
275 |
// faire planter javascript
|
276 |
$champs_a_garder = array('id', 'nom_sci','nom_sci_complet',
|
276 |
$champs_a_garder = array('id', 'nom_sci','nom_sci_complet',
|
277 |
'famille','nom_retenu.id', 'nom_retenu.libelle', 'num_taxonomique');
|
277 |
'famille','nom_retenu.id', 'nom_retenu.libelle', 'num_taxonomique');
|
278 |
$resultat = array();
|
278 |
$resultat = array();
|
279 |
if (isset($infos) && !empty($infos)) {
|
279 |
if (isset($infos) && !empty($infos)) {
|
280 |
$infos = (array)$infos;
|
280 |
$infos = (array)$infos;
|
281 |
if(isset($infos['nom_sci']) && $infos['nom_sci'] != '') {
|
281 |
if(isset($infos['nom_sci']) && $infos['nom_sci'] != '') {
|
282 |
$resultat = array_intersect_key($infos, array_flip($champs_a_garder));
|
282 |
$resultat = array_intersect_key($infos, array_flip($champs_a_garder));
|
283 |
$resultat['retenu'] = ($infos['id'] == $infos['nom_retenu.id']) ? "true" : "false";
|
283 |
$resultat['retenu'] = ($infos['id'] == $infos['nom_retenu.id']) ? "true" : "false";
|
284 |
}
|
284 |
}
|
285 |
}
|
285 |
}
|
286 |
return $resultat;
|
286 |
return $resultat;
|
287 |
}
|
287 |
}
|
Line 288... |
Line 288... |
288 |
|
288 |
|