Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 362 → Rev 363

/trunk/services/modules/0.1/bdtfx/CommunNomsTaxons.php
385,11 → 385,14
$validite_ressource = true;
if ($decomposition) {
list($radical, $suffixe) = $decomposition;
$champs_complementaire = array('nom_retenu_complet', 'basionyme_complet');
// on verifie si le nom du champ existe bien
if (!$this->estChampApi($radical) && !$this->estChampComplementaire($radical)) {
$validite_ressource = false;
$e = 'Le champ "'.$radical.'" n\'existe pas dans la base. <br/><br/>';
$this->renvoyerErreur( RestServeur::HTTP_CODE_MAUVAISE_REQUETE, $e);
if (!in_array($radical, $champs_complementaire)) {
$validite_ressource = false;
$e = 'Le champ "'.$radical.'" n\'existe pas dans la base. <br/><br/>';
$this->renvoyerErreur( RestServeur::HTTP_CODE_MAUVAISE_REQUETE, $e);
}
} elseif ($this->estUnPoint($champ)) {
$validite_ressource = $this->verifierValiditeSuffixe($suffixe, $radical);
}
/trunk/services/modules/0.1/bdtfx/Noms.php
71,16 → 71,16
break;
case 'masque.nn' :
$this->requete_condition []= 'num_nom IN ('.$val.')';
$this->masque['num_nom'] = "num_nom=$val";
$this->masque['num_nom'] = "num_nom=$val";
break;
case 'masque.rg' :
$this->ajouterFiltreMasque('rang', $val);
$this->ajouterFiltreMasque('rang', $val);
break;
case 'retour.champs' :
$this->verifierParamChamps($param, $val);
break;
case 'distinct' :
$this->distinct = $val;
$this->distinct = $val;
break;
}
$this->ajouterNomDistinct();
91,7 → 91,9
$this->recupererTableSignification('correspondance_champs,champs_api,champs_comp');
$champs_demandes = explode(',', $val);
$champs_verifies = array();
$champs_api = array_flip($this->champs_api);
$champs_api = array_flip($this->champs_api);
$champs_supp = array('nom_retenu_complet'=>'num_nom_retenu', 'basionyme_complet'=>'basionyme');
$champs_api = array_merge($champs_api, $champs_supp);
foreach ($champs_demandes as $champ) {
if (array_key_exists($champ, $champs_api)) {
$champs_verifies[] = $champs_api[$champ];
248,7 → 250,7
' FROM '.$this->table
.$this->retournerRequeteCondition()
.$this->requete_group_by
.$this->formerRequeteLimite();
.$this->formerRequeteLimite();
return $requete;
}