470,14 → 470,16 |
public function formaterIdSynonymie($resultat) { |
$this->recupererTableSignification('correspondance_champs,champs_api,champs_comp'); |
$retour_id_syn = array(); |
if ($resultat[0]['num_nom_retenu'] == '') { |
$retour_id_syn[] = 'nom_retenu N.D.'; |
} elseif (count($resultat) != 1) { |
if ($resultat[0]['num_nom_retenu'] == '') return array('nom_retenu N.D.'); |
|
// 1 ou + résultat(s) |
$retour_id_syn['entete'] = $this->afficherEnteteResultat('/'.$this->service.'/'.$this->ressources[0].'/relations/synonymie'); |
$retour_id_syn['entete']['id'] = $this->ressources[0]; |
$retour_id_syn['resultat'] = array(); |
|
// résultat contient aussi l'original |
if(count($resultat) > 1) { |
//on remplit d'abord l'entete du resultat |
$this->table_retour['id'] = $this->ressources[0]; |
$this->afficherEnteteResultat('/'.$this->service.'/'.$this->ressources[0].'/relations/synonymie'); |
$retour_id_syn['entete'] = $this->table_retour; |
$this->table_retour = array(); |
foreach ($resultat as $tab) { |
//pour chaque basionyme, on recupère le résultat : num_nom, nom_sci, basionyme et num_nom_retenu : |
$this->resultat_req = $tab; |
627,7 → 629,7 |
$resultat = $this->trierRechercheFloue($this->parametres[$masque[0]], $resultat, $masque[1]); |
} |
|
$table_retour_json['entete'] = $this->remplirJsonEntete(); |
$table_retour_json['entete'] = $this->afficherEnteteResultat('/'.$this->service); |
$table_retour_json['resultat'] = $this->remplirJsonResultat($resultat); |
return $table_retour_json; |
} |
656,14 → 658,5 |
|
return $noms; |
} |
|
public function remplirJsonEntete() { |
$entete = array(); |
if (isset($this->masque)) { |
$this->table_retour['masque'] = implode('&', $this->masque); |
} |
parent::afficherEnteteResultat('/'.$this->service); |
return $this->table_retour; |
} |
} |
?> |