Merge pull request #17507 from atm-john/11.0_fix_search_accent_in_description

FIX : search accented words in product description (consumption page)
This commit is contained in:
Laurent Destailleur 2021-05-06 16:45:21 +02:00 committed by GitHub
commit 824a601014
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -309,7 +309,7 @@ if (!empty($sql_select))
if ($sref) $sql.= " AND ".$doc_number." LIKE '%".$db->escape($sref)."%'"; if ($sref) $sql.= " AND ".$doc_number." LIKE '%".$db->escape($sref)."%'";
if ($sprod_fulldescr) if ($sprod_fulldescr)
{ {
$sql.= " AND (d.description LIKE '%".$db->escape($sprod_fulldescr)."%'"; $sql.= " AND (d.description LIKE '%".$db->escape($sprod_fulldescr)."%' OR d.description LIKE '%".$db->escape(dol_htmlentities($sprod_fulldescr))."%'";
if (GETPOST('type_element') != 'fichinter') $sql.= " OR p.ref LIKE '%".$db->escape($sprod_fulldescr)."%'"; if (GETPOST('type_element') != 'fichinter') $sql.= " OR p.ref LIKE '%".$db->escape($sprod_fulldescr)."%'";
if (GETPOST('type_element') != 'fichinter') $sql.= " OR p.label LIKE '%".$db->escape($sprod_fulldescr)."%'"; if (GETPOST('type_element') != 'fichinter') $sql.= " OR p.label LIKE '%".$db->escape($sprod_fulldescr)."%'";
$sql.=")"; $sql.=")";