Merge pull request #6279 from hregis/4.0_bug3

Fix: search problem if name contains accents
This commit is contained in:
Laurent Destailleur 2017-01-16 00:44:56 +01:00 committed by GitHub
commit 9f17e56923

View File

@ -321,7 +321,7 @@ if ($mode != 'marketplace')
$moreforfilter.= $langs->trans('Keyword') . ': <input type="text" name="search_keyword" value="'.dol_escape_htmltag($search_keyword).'">'; $moreforfilter.= $langs->trans('Keyword') . ': <input type="text" name="search_keyword" value="'.dol_escape_htmltag($search_keyword).'">';
$moreforfilter.= '</div>'; $moreforfilter.= '</div>';
$moreforfilter.='<div class="divsearchfield">'; $moreforfilter.='<div class="divsearchfield">';
$moreforfilter.= $langs->trans('Origin') . ': '.$form->selectarray('search_nature', $arrayofnatures, $search_nature, 1); $moreforfilter.= $langs->trans('Origin') . ': '.$form->selectarray('search_nature', $arrayofnatures, dol_escape_htmltag($search_nature), 1);
$moreforfilter.= '</div>'; $moreforfilter.= '</div>';
if (! empty($conf->global->MAIN_FEATURES_LEVEL)) if (! empty($conf->global->MAIN_FEATURES_LEVEL))
{ {
@ -415,7 +415,7 @@ if ($mode != 'marketplace')
{ {
//print $reg[1].'-'.dol_escape_htmltag($objMod->getPublisher()); //print $reg[1].'-'.dol_escape_htmltag($objMod->getPublisher());
$publisher=dol_escape_htmltag($objMod->getPublisher()); $publisher=dol_escape_htmltag($objMod->getPublisher());
if ($reg[1] && $reg[1] != $publisher) continue; if ($reg[1] && dol_escape_htmltag($reg[1]) != $publisher) continue;
if (! $reg[1] && ! empty($publisher)) continue; if (! $reg[1] && ! empty($publisher)) continue;
} }
if ($search_nature == 'core' && $objMod->isCoreOrExternalModule() == 'external') continue; if ($search_nature == 'core' && $objMod->isCoreOrExternalModule() == 'external') continue;