FIX #13641
This commit is contained in:
parent
ed045b2673
commit
635b9bb0fe
@ -33,12 +33,12 @@ if (! empty($extrafieldsobjectkey) && ! empty($search_array_options) && is_array
|
|||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($crit != '' && (! in_array($typ, array('select','sellist')) || $crit != '0') && (! in_array($typ, array('link')) || $crit != '-1'))
|
elseif ($crit != '' && (! in_array($typ, array('select', 'sellist')) || $crit != '0') && (! in_array($typ, array('link')) || $crit != '-1'))
|
||||||
{
|
{
|
||||||
$mode_search=0;
|
$mode_search=0;
|
||||||
if (in_array($typ, array('int','double','real'))) $mode_search=1; // Search on a numeric
|
if (in_array($typ, array('int', 'double', 'real', 'price'))) $mode_search=1; // Search on a numeric
|
||||||
if (in_array($typ, array('sellist','link')) && $crit != '0' && $crit != '-1') $mode_search=2; // Search on a foreign key int
|
if (in_array($typ, array('sellist', 'link')) && $crit != '0' && $crit != '-1') $mode_search=2; // Search on a foreign key int
|
||||||
if (in_array($typ, array('chkbxlst','checkbox'))) $mode_search=4; // Search on a multiselect field with sql type = text
|
if (in_array($typ, array('chkbxlst', 'checkbox'))) $mode_search=4; // Search on a multiselect field with sql type = text
|
||||||
if (is_array($crit)) $crit = implode(' ', $crit); // natural_search() expects a string
|
if (is_array($crit)) $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) {
|
||||||
$sql .= ' AND (' . $extrafieldsobjectprefix.$tmpkey . ' = "' . $db->escape($crit) . '")';
|
$sql .= ' AND (' . $extrafieldsobjectprefix.$tmpkey . ' = "' . $db->escape($crit) . '")';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user