Merge pull request #32731 from frederic34/patch-10
NEW default values for filters that are multiselect array are now supported
This commit is contained in:
commit
fdd3ad6fe6
1 changed files with 5 additions and 4 deletions
|
|
@ -1065,7 +1065,8 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null
|
|||
// Check type of variable and make sanitization according to this
|
||||
if (preg_match('/^array/', $check)) { // If 'array' or 'array:restricthtml' or 'array:aZ09' or 'array:intcomma'
|
||||
if (!is_array($out) || empty($out)) {
|
||||
$out = array();
|
||||
$out = explode(',', $out);
|
||||
$tmpcheck = 'alphanohtml';
|
||||
} else {
|
||||
$tmparray = explode(':', $check);
|
||||
if (!empty($tmparray[1])) {
|
||||
|
|
@ -1073,9 +1074,9 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null
|
|||
} else {
|
||||
$tmpcheck = 'alphanohtml';
|
||||
}
|
||||
foreach ($out as $outkey => $outval) {
|
||||
$out[$outkey] = sanitizeVal($outval, $tmpcheck, $filter, $options);
|
||||
}
|
||||
}
|
||||
foreach ($out as $outkey => $outval) {
|
||||
$out[$outkey] = sanitizeVal($outval, $tmpcheck, $filter, $options);
|
||||
}
|
||||
} else {
|
||||
// If field name is 'search_xxx' then we force the add of space after each < and > (when following char is numeric) because it means
|
||||
|
|
|
|||
Loading…
Reference in a new issue