Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 1203 → Rev 1204

/trunk/services/modules/0.1/moissonnage/cartes/SourceDonnees.php
124,10 → 124,22
return $stations;
}
public function recupererStationsPhotoflora() {
$this->bdd->requeter("USE ".Config::get('bdd_nom'));
$requete =
"SELECT DISTINCTROW lieu_commune_code_insee, observation_date AS date, observateur_nom_complet AS auteur ".
"FROM photoflora_tapir WHERE ".$this->construireWhereTaxonMoissonnage('photoflora')." ".
"AND Length(lieu_commune_code_insee)=5 ORDER BY lieu_commune_code_insee, date"." -- " . __FILE__ . ":" . __LINE__." ". @$_SERVER['REQUEST_URI'];
$stations = $this->bdd->recupererTous($requete);
$this->rechercherInfosCommune($stations);
return $stations;
}
private function construireWhereTaxonMoissonnage($source) {
$nomRang = $this->obtenirNomRang();
$criteres = array();
$criteres[] = (in_array($source, array("baznat", "ifn", "vigie_flore")) ) ?
$criteres[] = (in_array($source, array("baznat", "ifn", "vigie_flore", "photoflora")) ) ?
"num_nom = ".$this->taxon['num_nom'] :
"nom_scientifique_complet LIKE ".$this->bdd->proteger($this->taxon['nom_sci']) ;
if ($this->nomRang == 'espece' || $this->nomRang == 'sous_espece') {
138,7 → 150,7
"nom_scientifique_complet LIKE ".$this->bdd->proteger($sousTaxon['nom_sci']) ;
}
} else {
$criteres[] = (in_array($source, array("baznat", "ifn", "vigie_flore"))) ?
$criteres[] = (in_array($source, array("baznat", "ifn", "vigie_flore", "photoflora"))) ?
"num_nom = ".$sousTaxon['num_nom'] :
"nom_scientifique_complet LIKE ".$this->bdd->proteger($sousTaxon['nom_sci']) ;
}