correction des bug minmax
This commit is contained in:
parent
8cd4fe17d0
commit
bfe9a89091
@ -17,7 +17,7 @@ Class Ciblage
|
||||
|
||||
protected function setMinMax($name, $valeur)
|
||||
{
|
||||
if(!$this->need) {
|
||||
/*if(!$this->need) {*/
|
||||
if(!empty($name)) {
|
||||
$default = Fields::getMinMax($name);
|
||||
|
||||
@ -25,7 +25,7 @@ Class Ciblage
|
||||
if(empty($valeur[1])){$valeur[1] = $default[0]['max'];}
|
||||
}
|
||||
return ($valeur);
|
||||
}
|
||||
/*}*/
|
||||
return ($valeur);
|
||||
}
|
||||
public function __construct($structure, $need = false)
|
||||
@ -41,16 +41,16 @@ Class Ciblage
|
||||
foreach($structure as $key => $valeur) {
|
||||
if (method_exists($this, $key)) {
|
||||
if(is_array($valeur)) {
|
||||
if($valeur[0] != "" and $valeur[0] != 'tous')
|
||||
$this->$key($valeur);
|
||||
if(isset($valeur[0])) {
|
||||
if($valeur[0] != "" and $valeur[0] != 'tous')
|
||||
$this->$key($valeur);
|
||||
}
|
||||
} else {
|
||||
if($valeur != 'tous' and $valeur != "")
|
||||
$this->$key($valeur);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Provisoir */
|
||||
//$this->setFilter('bilTca', array(4, 5, 6));
|
||||
}
|
||||
public function extract()
|
||||
{
|
||||
@ -109,7 +109,7 @@ Class Ciblage
|
||||
$this->sphinx->SetFilterRange($name, intval($valeur[0]), intval($valeur[1]));
|
||||
}
|
||||
protected function writeRequest($name, $valeur, $or = false) {
|
||||
$this->alpha .= '@'.$name . '(';
|
||||
$this->alpha .= '@'.$name . ' (';
|
||||
if(!is_array($valeur)) {
|
||||
$this->alpha .= $valeur.')';
|
||||
} else {
|
||||
@ -326,6 +326,7 @@ Class Ciblage
|
||||
}
|
||||
protected function bilFK($valeur) {
|
||||
$valeur = $this->setMinMax('bilFK', $valeur);
|
||||
print_r($valeur);
|
||||
$this->setFilterRange('bilFK', $valeur);
|
||||
}
|
||||
protected function bilFR($valeur) {
|
||||
@ -351,41 +352,33 @@ Class Ciblage
|
||||
protected function bilHD($valeur) {
|
||||
$valeur = $this->setMinMax('bilHD', $valeur);
|
||||
$this->setFilterRange('bilHD', $valeur);
|
||||
}
|
||||
|
||||
}
|
||||
protected function bilHL($valeur) {
|
||||
$valeur = $this->setMinMax('bilHL', $valeur);
|
||||
$this->setFilterRange('bilHL', $valeur);
|
||||
}
|
||||
|
||||
protected function bilHM($valeur) {
|
||||
$valeur = $this->setMinMax('bilHM', $valeur);
|
||||
$this->setFilterRange('bilHM', $valeur);
|
||||
}
|
||||
|
||||
protected function bilHN($valeur) {
|
||||
$valeur = $this->setMinMax('bilHN', $valeur);
|
||||
$this->setFilterRange('bilHN', $valeur);
|
||||
}
|
||||
|
||||
protected function bilYP($valeur) {
|
||||
$valeur = $this->setMinMax('bilYP', $valeur);
|
||||
$this->setFilterRange('bilYP', $valeur);
|
||||
}
|
||||
|
||||
protected function avisCs($valeur) {
|
||||
$valeur = explode('-', $valeur);
|
||||
$this->setFilter('avisCs', $valeur);
|
||||
}
|
||||
|
||||
protected function bilFS($valeur) {
|
||||
$this->setFilterRange('bilFS', $valeur);
|
||||
}
|
||||
|
||||
protected function lieuAct($valeur) {
|
||||
$this->setFilter('lieuAct', $valeur);
|
||||
}
|
||||
|
||||
protected function bilGG($valeur) {
|
||||
$this->setFilterRange('bilGG', $valeur);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user