Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 940 → Rev 941

/trunk/services/modules/0.1/commun/Commun.php
565,12 → 565,12
//+------------------------------------------------------------------------------------------------------+
// Fonctions appelées par plusieurs web services
public function obtenirNumNomTaxonsSuperieurs($nn_demande) {
public function obtenirNumNomTaxonsSuperieurs($referentiel, $nn_demande) {
$nn_taxons_sup = array();
// TODO: ceci ramène trop de champs alors que l'on a besoin que du numéro nomenclatural
// et il y a peut-être un meilleur moyen que ramener la hierarchie des taxons supérieurs
// mais pour le moment ça marche et c'est assez rapide
$url = $this->ajouterHrefAutreProjet('taxons', $nn_demande, '/relations/superieurs',Config::get('referentiel'));
$url = $this->ajouterHrefAutreProjet('taxons', $nn_demande, '/relations/superieurs',$referentiel);
$classification = $this->consulterHref($url);
$classification = is_object($classification) ? get_object_vars($classification) : array();
/trunk/services/modules/0.1/liste-rouge/Categorie.php
57,7 → 57,7
public function obtenirCategorieListeRouge() {
$nn = $this->parametres['masque.nn'];
$nns = $this->obtenirNumNomTaxonsSuperieurs($nn);
$nns = $this->obtenirNumNomTaxonsSuperieurs(Config::get('referentiel'), $nn);
$nns[] = $nn;
$nns = array_map(array($this->bdd, 'proteger') ,$nns);
/trunk/services/modules/0.1/sptb/Statuts.php
89,7 → 89,7
$nn_demande = $this->parametres['masque.nn'];
$conditions_taxons = array();
$conditions_taxons = $this->obtenirNumNomTaxonsSuperieurs($nn_demande);
$conditions_taxons = $this->obtenirNumNomTaxonsSuperieurs(Config::get('referentiel'), $nn_demande);
$conditions_taxons[] = $this->bdd->proteger($nn_demande);
$requete = "SELECT * FROM ".Config::get('bdd_table_especes').' '.
/trunk/services/modules/0.1/sptba/Statuts.php
89,7 → 89,7
$nn_demande = $this->parametres['masque.nn'];
$conditions_taxons = array();
$conditions_taxons = $this->obtenirNumNomTaxonsSuperieurs($nn_demande);
$conditions_taxons = $this->obtenirNumNomTaxonsSuperieurs(Config::get('referentiel'), $nn_demande);
$conditions_taxons[] = $this->bdd->proteger($nn_demande);
$requete = "SELECT * FROM ".Config::get('bdd_table_especes').' '.