correction de confditions fausse

This commit is contained in:
Damien LASSERRE 2012-01-25 09:00:47 +00:00
parent 3bfc072fb2
commit 80522ddb4d

View File

@ -37,7 +37,7 @@ Class Ciblage
$this->$key($valeur); $this->$key($valeur);
} }
} else { } else {
if($valeur != 'tous') if($valeur != 'tous' and $valeur != "")
$this->$key($valeur); $this->$key($valeur);
} }
} }
@ -105,11 +105,12 @@ Class Ciblage
$i++; $i++;
} }
} }
echo $this->alpha;
} }
protected function setAlpha($name, $valeur) protected function setAlpha($name, $valeur)
{ {
$or = array('adr_cp', 'adr_dep', 'bilType'); $or = array('bilType');
$and = array('ape_entrep', 'ape_etab', 'age_entrep', 'age_etab', 'NaceEntrep', 'NaceEtab'); $and = array('ape_entrep', 'ape_etab', 'age_entrep', 'age_etab', 'NaceEntrep', 'NaceEtab');
if(in_array($name, $or)) { if(in_array($name, $or)) {
@ -138,7 +139,7 @@ Class Ciblage
} }
protected function adr_cp($valeur) { protected function adr_cp($valeur) {
$this->setAlpha('adr_cp', $valeur); $this->setFilter('adr_cp', $valeur);
} }
protected function adr_dep($valeur) { protected function adr_dep($valeur) {