Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 1205 → Rev 1206

/branches/v5.12-baouque/services/modules/0.1/nva/NomsVernaculaires.php
126,7 → 126,8
 
public function ajouterFiltreMasque($nom_champ, $valeur) {
if ($nom_champ == 'num_taxon') { // si il s'agit d'un chiffre
$this->requete_condition[] = $nom_champ.' = '.$this->getBdd()->proteger($valeur);
$valeur = implode(',', array_map(array($this->getBdd(), 'proteger'), explode(',',$valeur)));
$this->requete_condition[] = $nom_champ.' IN ('.$valeur.')';
} else {
if ($this->recherche == 'floue') {
$this->requete_condition[] = '(SOUNDEX('.$nom_champ.') = SOUNDEX(\''.$valeur.'\')'
151,8 → 152,6
$this->traiterRessourceChamp(); //modifie requete_champ ou requete_condition
}
}
} else { //rajoute distinct pour ne pas avoir plusieurs fois le même nom
$this->requete_champ = array('distinct(nva.num_nom_vernaculaire)', 'nva.nom_vernaculaire ');
}
}
 
202,6 → 201,7
' FROM '.str_replace('nva', 'nva_index', $this->table).' inva'.
' LEFT JOIN '.$this->table.' nva ON nva.num_nom_vernaculaire = inva.num_nom_vernaculaire '
.$this->formerRequeteCondition().
' GROUP BY nva.num_nom_vernaculaire '.
' ORDER BY tri DESC, nva.nom_vernaculaire ASC '
.$this->formerRequeteLimite();
return $requete;
295,6 → 295,7
foreach ($tab as $key => $valeur) {
if ($valeur != '') {
switch ($key) {
case 'num_taxon' : $this->table_retour['num_taxon'] = $valeur; break;
case 'num_nom_vernaculaire' : $num = $valeur; break;
case 'nom_vernaculaire' : $this->table_retour['nom'] = $valeur; break;
default : break;