mots clés approchants + mot clé suivi d'un caractère de ponctuation.
This commit is contained in:
parent
a6a46fea76
commit
f7b1e76387
@ -109,7 +109,7 @@ class search extends common {
|
||||
$a = explode(' ',self::$motclef);
|
||||
foreach ($a as $key => $value) {
|
||||
|
||||
$keywords .= self::$motentier === false ? $value . '|' : '\\b' . $value . '\\b|' ;
|
||||
$keywords .= self::$motentier === true ? $value . '|' : '\\b' . $value . '\\b\\W|' ;
|
||||
}
|
||||
$keywords = substr($keywords,0,strlen($keywords) - 1);
|
||||
$keywords .= ')/i';
|
||||
|
@ -16,9 +16,8 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::checkbox('searchMotentier', true, 'Mot entier uniquement', [
|
||||
'checked' => $module::$motentier,
|
||||
'help' => 'Pour rechercher des mots-clés consécutifs, reliez-les par le symbole +.'
|
||||
<?php echo template::checkbox('searchMotentier', true, 'Mots clés approchants', [
|
||||
'checked' => $module::$motentier
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user