Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 916 Rev 926
Line 127... Line 127...
127
	public function traiterParametresCommuns() {
127
	public function traiterParametresCommuns() {
Line 128... Line 128...
128
 
128
 
Line 129... Line 129...
129
	}
129
	}
-
 
130
 
130
 
131
	public function ajouterFiltreMasque($nom_champ, $valeur) {
131
	public function ajouterFiltreMasque($nom_champ, $valeur) {
132
		$orig_val = $valeur;
132
		$valeur = explode(',',$valeur);
133
		$valeur = explode(',',$valeur);
133
		$conditions = array();
134
		$conditions = array();
134
		if ($nom_champ == 'annee' || $nom_champ == 'rang') {
135
		if ($nom_champ == 'annee' || $nom_champ == 'rang') {
Line 146... Line 147...
146
				foreach ($valeur as $val) {
147
				foreach ($valeur as $val) {
147
					$val = $this->getBdd()->proteger($val);
148
					$val = $this->getBdd()->proteger($val);
148
					$conditions[] = "( SOUNDEX($nom_champ) = SOUNDEX($val))".
149
					$conditions[] = "( SOUNDEX($nom_champ) = SOUNDEX($val))".
149
											" OR ( SOUNDEX(REVERSE($nom_champ)) = SOUNDEX(REVERSE($val)))";
150
											" OR ( SOUNDEX(REVERSE($nom_champ)) = SOUNDEX(REVERSE($val)))";
150
				}
151
				}
-
 
152
				// utile pour la détermination à partir d'un nom retenu (concat(nom_sci,auteur)) lors
-
 
153
				// d'un import depuis le CEL
-
 
154
			} elseif ($this->parametres['recherche'] == 'concat' && $nom_champ == 'nom_sci') {
-
 
155
				$conditions[] = "CONCAT(nom_sci, ' ', auteur) = " . $this->getBdd()->proteger($orig_val);
-
 
156
 
151
			} else {
157
			} else {
152
				foreach ($valeur as $val) {
158
				foreach ($valeur as $val) {
153
					$conditions[] = "$nom_champ LIKE ".$this->getBdd()->proteger($val);
159
					$conditions[] = "$nom_champ LIKE ".$this->getBdd()->proteger($val);
154
				}
160
				}
155
			}
161
			}