aperçu sur deux lignes

This commit is contained in:
Fred Tempez 2020-08-17 10:51:45 +02:00
parent 0e93feb076
commit 58b923fc18

View File

@ -211,8 +211,8 @@ class search extends common {
$nboccu .= count($matches[0]);
foreach ($matches[0] as $key => $value) {
// Mise en évidence
$d = $value[1] -50 < 0 ? 1 : $value[1] - 50;
$t = substr($contenu,(int) $d ,150);
$d = $value[1] - 50 < 0 ? 1 : $value[1] - 50;
$t = substr($contenu,(int) $d ,200);
// Nettoyage caractères invalides
$t = preg_replace('/[^[:alnum:][:space:]]/u', '', $t);
// Applique une mise en évidence