N°1226 : When global searching with needles smaller than 'full_text_needle_min', exclude these needles from the search instead of stopping it

SVN:trunk[5799]
This commit is contained in:
Stephen Abello
2018-05-17 14:16:18 +00:00
parent 7c128e0f6e
commit 1f8110573c

View File

@@ -590,9 +590,19 @@ try
if (strlen($sNeedle) < $iMinLenth)
{
$oP->p(Dict::Format('UI:Search:NeedleTooShort', $sNeedle, $iMinLenth));
$iErrors++;
$key = array_search($sNeedle, $aFullTextNeedles);
if($key!== false)
{
unset($aFullTextNeedles[$key]);
}
}
}
if(empty($aFullTextNeedles))
{
$oP->p(Dict::S('UI:Search:NoSearch'));
break;
}
$sFullText = implode(' ', $aFullTextNeedles);
// Sanity check of the accelerators
/** @var array $aAccelerators */