Line 81... |
Line 81... |
81 |
public function traiterParametres() {
|
81 |
public function traiterParametres() {
|
82 |
if (isset($this->parametres) && !empty($this->parametres)) {
|
82 |
if (isset($this->parametres) && !empty($this->parametres)) {
|
83 |
foreach ($this->parametres as $param => $valeur) {
|
83 |
foreach ($this->parametres as $param => $valeur) {
|
84 |
switch ($param) {
|
84 |
switch ($param) {
|
85 |
case 'categorie' :
|
85 |
case 'categorie' :
|
86 |
if ($valeur == "description" && $this->nb_ressources == 1 ) {
|
86 |
if($this->nb_ressources != 1 ) {
|
- |
|
87 |
$e = "Nombre de ressource != 1 pour informations/#id/relations/catminat";
|
- |
|
88 |
throw new Exception($e, RestServeur::HTTP_CODE_MAUVAISE_REQUETE);
|
- |
|
89 |
}
|
- |
|
90 |
|
- |
|
91 |
if ($valeur == "description") {
|
87 |
$this->champs_recherches = "num_nomen, BDNT, chorologie, inflorescence,"
|
92 |
$this->champs_recherches = "num_nomen, BDNT, chorologie, inflorescence,"
|
88 |
." sexualite, ordre_maturation, "
|
93 |
." sexualite, ordre_maturation, "
|
89 |
."pollinisation, fruit, dissemination, couleur_fleur, macule, floraison, type_bio, "
|
94 |
."pollinisation, fruit, dissemination, couleur_fleur, macule, floraison, type_bio, "
|
90 |
."form_vegetale ";
|
95 |
."form_vegetale ";
|
91 |
$this->requete_condition[] = "( chorologie != '' OR inflorescence != '' ".
|
96 |
$this->requete_condition[] = "( chorologie != '' OR inflorescence != '' ".
|
92 |
"OR sexualite != '' OR ordre_maturation != '' OR pollinisation != '' ".
|
97 |
"OR sexualite != '' OR ordre_maturation != '' OR pollinisation != '' ".
|
93 |
"OR fruit != '' OR dissemination != '' OR couleur_fleur != '' OR macule != '' ".
|
98 |
"OR fruit != '' OR dissemination != '' OR couleur_fleur != '' OR macule != '' ".
|
94 |
"OR floraison != '' OR type_bio != '' OR form_vegetale != '' )";
|
99 |
"OR floraison != '' OR type_bio != '' OR form_vegetale != '' )";
|
95 |
}elseif ($valeur == "ecologie" && $this->nb_ressources == 1) {
|
100 |
} elseif ($valeur == "ecologie") {
|
96 |
$this->champs_recherches = " num_nomen, BDNT, ve_lumiere , ve_temperature,"
|
101 |
$this->champs_recherches = " num_nomen, BDNT, ve_lumiere , ve_temperature,"
|
97 |
." ve_continentalite, ve_humidite_atmos, ve_humidite_edaph, ve_reaction_sol,"
|
102 |
." ve_continentalite, ve_humidite_atmos, ve_humidite_edaph, ve_reaction_sol,"
|
98 |
." ve_nutriments_sol, ve_salinite, ve_texture_sol, ve_mat_org_sol, "
|
103 |
." ve_nutriments_sol, ve_salinite, ve_texture_sol, ve_mat_org_sol, "
|
99 |
." vi_lumiere, vi_temperature, vi_continentalite, vi_humidite_edaph,"
|
104 |
." vi_lumiere, vi_temperature, vi_continentalite, vi_humidite_edaph,"
|
100 |
." vi_reaction_sol, vi_nutriments_sol, vi_salinite ";
|
105 |
." vi_reaction_sol, vi_nutriments_sol, vi_salinite ";
|