issue #0001377 : Vérification des minimums et maximums
This commit is contained in:
parent
e5897edb25
commit
e91eed0e1a
@ -886,9 +886,27 @@ Les zones urbaines sensibles constituent un sous-ensemble de l'ensemble plus lar
|
||||
unset($this->ciblage[$sessionKey]['in']);
|
||||
break;
|
||||
case 'interval':
|
||||
//@todo : Check Min Max
|
||||
//@todo : Check Number => A préciser dans Fields
|
||||
//@todo : Check Date => A préciser dans Fields
|
||||
//Read min max
|
||||
$minmaxM = new Application_Model_MinMax();
|
||||
$minmax = $minmaxM->find($sessionKey)->current();
|
||||
if ($minmax!==false) {
|
||||
$valMin = $minmax->min;
|
||||
$valMax = $minmax->max;
|
||||
|
||||
if ($value[0]<$valMin) {
|
||||
$value[0] = $valMin;
|
||||
}
|
||||
if ($value[0]>$valMax) {
|
||||
return false;
|
||||
}
|
||||
if ($value[1]>$valMax) {
|
||||
$value[1]=$valMax;
|
||||
}
|
||||
if ($value[1]<$valMin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case 'checkbox':
|
||||
if ( $value==0 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user