2
0
forked from Wavyzz/dolibarr

Clean code

This commit is contained in:
Laurent Destailleur
2020-10-06 15:11:45 +02:00
parent 254d9edbb9
commit 95f67309e2
7 changed files with 49 additions and 42 deletions

View File

@@ -7828,7 +7828,7 @@ function natural_search($fields, $value, $mode = 0, $nofirstand = 0)
$listofcodes .= "'".$db->escape($val)."'";
}
}
$newres .= ($i2 > 0 ? ' OR ' : '').$field." ".($mode == -3 ? 'NOT ' : '')."IN (".$db->sanitize($listofcodes).")";
$newres .= ($i2 > 0 ? ' OR ' : '').$field." ".($mode == -3 ? 'NOT ' : '')."IN (".$db->sanitize($listofcodes, 1).")";
$i2++; // a criteria was added to string
}
if ($mode == -3) $newres .= ' OR '.$field.' IS NULL';