From a6ed77b1211cd440e464ee2bb522f95485760b2c Mon Sep 17 00:00:00 2001 From: Damien LASSERRE Date: Fri, 20 Jan 2012 14:02:33 +0000 Subject: [PATCH] modification d'un condition --- library/Scores/Ciblage.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/library/Scores/Ciblage.php b/library/Scores/Ciblage.php index 88784a9c..39baf95f 100644 --- a/library/Scores/Ciblage.php +++ b/library/Scores/Ciblage.php @@ -28,7 +28,7 @@ Class Ciblage $this->sphinx->SetServer($this->sphinx_host, $this->sphinx_port); $this->sphinx->SetMatchMode(SPH_MATCH_EXTENDED2); $this->sphinx->ResetFilters(); - if(!empty($structure)) { + /*if(!empty($structure)) {*/ foreach($structure as $key => $valeur) { if (method_exists($this, $key)) { @@ -42,7 +42,7 @@ Class Ciblage } } } - } + /*}*/ } public function calculRedevanceInsee() @@ -162,7 +162,8 @@ Class Ciblage } protected function capital($valeur) { - $this->setFilterRange('capital', $valeur); + if($valeur[0] != 0 or $valeur[1] != 0) + $this->setFilterRange('capital', $valeur); } protected function ape_etab($valeur) { @@ -186,11 +187,13 @@ Class Ciblage } protected function teff_entrep($valeur) { - $this->setFilterRange('teff_entrep', $valeur); + if($valeur[0] != 0 or $valeur[1] != 0) + $this->setFilterRange('teff_entrep', $valeur); } protected function teff_etab($valeur) { - $this->setFilterRange('teff_etab', $valeur); + if($valeur[0] != 0 or $valeur[1] != 0) + $this->setFilterRange('teff_etab', $valeur); } protected function rang($valeur) {