better search split for bad URL
This commit is contained in:
parent
b1f8cda044
commit
4908f533f3
1 changed files with 6 additions and 1 deletions
|
@ -227,7 +227,12 @@ class pubSaba
|
||||||
self::getPostsParams($p);
|
self::getPostsParams($p);
|
||||||
|
|
||||||
$OR = [];
|
$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 = [];
|
$AND = [];
|
||||||
$words = text::splitWords($sentence);
|
$words = text::splitWords($sentence);
|
||||||
foreach ($words as $word) {
|
foreach ($words as $word) {
|
||||||
|
|
Loading…
Reference in a new issue