Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 727 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 727 Rev 735
Line 35... Line 35...
35
	final protected function construireWhereTaxon() {
35
	final protected function construireWhereTaxon() {
36
		$criteres = array();
36
		$criteres = array();
37
		$nomRang = $this->obtenirNomRang($this->taxon);
37
		$nomRang = $this->obtenirNomRang($this->taxon);
38
		if ($nomRang == 'famille') {
38
		if ($nomRang == 'famille') {
39
			$criteres[] = "famille=".$this->bdd->proteger($this->taxon['nom_sci']);
39
			$criteres[] = "famille=".$this->bdd->proteger($this->taxon['nom_sci']);
-
 
40
		} elseif ($nomRang == 'genre') {
-
 
41
			$criteres[] = "nom_sel LIKE ".$this->bdd->proteger($this->taxon['nom_sci'].'%');
40
		} else {
42
		} else {
41
			$criteres[] = "nt=".$this->taxon['num_taxonomique'];
43
			$taxons = array($this->taxon['num_taxonomique']);
42
			$sousTaxons = $this->recupererSynonymesEtSousEspeces();
44
			$sousTaxons = $this->recupererSynonymesEtSousEspeces();
43
			foreach ($sousTaxons as $sousTaxon) {
45
			foreach ($sousTaxons as $sousTaxon) {
44
				$criteres[] ="nt=".$sousTaxon['num_taxonomique'];
46
				$taxons[] = $sousTaxon['num_taxonomique'];
45
			}
47
			}
-
 
48
			$criteres[] = "nt IN (".implode(',', $taxons).")";
46
		}
49
		}
47
		return "(".implode(' OR ',array_unique($criteres)).")";
50
		return "(".implode(' OR ',array_unique($criteres)).")";
48
	}
51
	}
Line 49... Line 52...
49
	
52