forked from Wavyzz/dolibarr
NEW Mutualize code for action="update_extras"
NEW Can use setValueFrom without user modification field FIX Exclude separators from mandatory extrafields test More code to use the new framework array for extrafields Can use text condition in extrafield visibility
This commit is contained in:
@@ -7148,17 +7148,17 @@ function natural_search($fields, $value, $mode=0, $nofirstand=0)
|
||||
else if ($mode == 4)
|
||||
{
|
||||
$tmparray=explode(',',trim($crit));
|
||||
|
||||
|
||||
if (count($tmparray))
|
||||
{
|
||||
$listofcodes='';
|
||||
|
||||
|
||||
foreach($tmparray as $val)
|
||||
{
|
||||
if ($val)
|
||||
{
|
||||
$newres .= ($i2 > 0 ? ' OR (' : '(') . $field . ' LIKE \'' . $db->escape(trim($val)) . ',%\'';
|
||||
$newres .= ' OR '. $field . ' = \'' . $db->escape(trim($val)) . '\'';
|
||||
$newres .= ' OR '. $field . ' = \'' . $db->escape(trim($val)) . '\'';
|
||||
$newres .= ' OR '. $field . ' LIKE \'%,' . $db->escape(trim($val)) . '\'';
|
||||
$newres .= ' OR '. $field . ' LIKE \'%,' . $db->escape(trim($val)) . ',%\'';
|
||||
$newres .= ')';
|
||||
|
||||
Reference in New Issue
Block a user