2
0
forked from Wavyzz/dolibarr

FIX Accept spaces around the | criteria

This commit is contained in:
Laurent Destailleur
2017-01-07 21:33:13 +01:00
parent 6585431849
commit 37d158f159

View File

@@ -5737,7 +5737,9 @@ function natural_search($fields, $value, $mode=0, $nofirstand=0)
else // $mode=0 else // $mode=0
{ {
$textcrit = ''; $textcrit = '';
$tmpcrits = explode('|',$crit); $tmpcrit = preg_replace('/\s+|/','|',$tmpcrit);
$tmpcrit = preg_replace('/|\s+/','|',$tmpcrit);
$tmpcrits = explode('|',$tmpcrit);
$i3 = 0; $i3 = 0;
foreach($tmpcrits as $tmpcrit) foreach($tmpcrits as $tmpcrit)
{ {