Fix sanitize
This commit is contained in:
parent
d50e0457f3
commit
1452e74431
@ -65,8 +65,8 @@ if (!empty($extrafieldsobjectkey) && !empty($search_array_options) && is_array($
|
|||||||
if (is_array($crit)) {
|
if (is_array($crit)) {
|
||||||
$crit = implode(' ', $crit); // natural_search() expects a string
|
$crit = implode(' ', $crit); // natural_search() expects a string
|
||||||
} elseif ($typ === 'select' and is_string($crit) and strpos($crit, ',') === false) {
|
} elseif ($typ === 'select' and is_string($crit) and strpos($crit, ',') === false) {
|
||||||
$critSelect = implode("','", array_map(array($db, 'escape'), explode(',', $crit)));
|
$critSelect = "'".implode("','", array_map(array($db, 'escape'), explode(',', $crit)))."'";
|
||||||
$sql .= " AND (".$extrafieldsobjectprefix.$tmpkey." IN ('".$critSelect."') )";
|
$sql .= " AND (".$extrafieldsobjectprefix.$tmpkey." IN (".$db->sanitize($critSelect, 1).") )";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$sql .= natural_search($extrafieldsobjectprefix.$tmpkey, $crit, $mode_search);
|
$sql .= natural_search($extrafieldsobjectprefix.$tmpkey, $crit, $mode_search);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user