/trunk/services/modules/0.1/bdtfx/CommunNomsTaxons.php |
---|
319,16 → 319,22 |
} |
public function afficherEnteteResultat($url_service) { |
$this->table_retour['depart'] = $this->limite_requete['depart']; |
$this->table_retour['limite'] = $this->limite_requete['limite']; |
$this->table_retour['total'] = $this->total_resultat; |
$arr = array( |
'depart' => $this->limite_requete['depart'], |
'limite' => $this->limite_requete['limite'], |
'total' => $this->total_resultat); |
if (isset($this->masque)) |
$arr['masque'] = implode('&', $this->masque); |
$url = $this->formulerUrl($this->total_resultat, $url_service); |
if (isset($url['precedent']) && $url['precedent'] != '') { |
$this->table_retour['href.precedent'] = $url['precedent']; |
$arr['href.precedent'] = $url['precedent']; |
} |
if (isset($url['suivant']) && $url['suivant'] != '') { |
$this->table_retour['href.suivant'] = $url['suivant']; |
$arr['href.suivant'] = $url['suivant']; |
} |
return $arr; |
} |
public function afficherNomHrefRetenu($tab, $num) { |
/trunk/services/modules/0.1/bdtfx/Noms.php |
---|
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; |
} |
} |
?> |
/trunk/services/modules/0.1/bdtfx/Taxons.php |
---|
362,10 → 362,7 |
$this->recupererTableSignification('correspondance_champs,champs_api,champs_comp'); |
$masque = $this->recupererMasquePrincipal(); |
if (isset($masque)) $resultat = $this->trierRechercheFloue($this->parametres[$masque[0]], $resultat, $masque[1]); |
if (isset($this->masque)) $this->table_retour['masque'] = implode('&', $this->masque); |
$this->afficherEnteteResultat('/'.$this->service); |
$table_retour_json['entete'] = $this->table_retour; |
$this->table_retour = array(); |
$table_retour_json['entete'] = $this->afficherEnteteResultat('/'.$this->service); |
//on remplit la table $table_retour_json['resultat'] |
$tab_tax_inf = $this->recupererListeTaxonInf($resultat); |
foreach ($resultat as $tab) { |