better search split for bad URL

This commit is contained in:
Jean-Christian Paul Denis 2022-12-17 11:41:13 +01:00
parent b1f8cda044
commit 4908f533f3
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

@ -227,7 +227,12 @@ class pubSaba
self::getPostsParams($p);
$OR = [];
foreach (explode(',', $p['search']) as $sentence) {
# decoupe un peu plus la recherche
$splits = preg_split("#[\s//,-_]+#", $p['search']);
if (!$splits) {
$splits = explode(',', $p['search']);
}
foreach ($splits as $sentence) {
$AND = [];
$words = text::splitWords($sentence);
foreach ($words as $word) {