From ee38139a592f5f5faa7e0d12f1dd4b5804c6ab7b Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Mon, 19 Apr 2010 07:07:03 +0000 Subject: [PATCH] =?UTF-8?q?Modification=20de=20l'expression=20reguli=C3=A8?= =?UTF-8?q?re=20pour=20la=20recherche=20de=20balise=20siren?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/commentaires/commentaires.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/commentaires/commentaires.php b/includes/commentaires/commentaires.php index f2a4f9cd3..aecc394b9 100644 --- a/includes/commentaires/commentaires.php +++ b/includes/commentaires/commentaires.php @@ -1,8 +1,8 @@ ([0-9]{3}) ([0-9]{3}) ([0-9]{3})@si'; - $replace = '$1 $2 $3'; + $pattern = '/(.*?)([0-9]{3}) ([0-9]{3}) ([0-9]{3})<\/siren>(.*?)/i'; + $replace = '$1$2 $3 $4$5'; $output = preg_replace($pattern, $replace, $content); return $output; } @@ -10,8 +10,6 @@ function commentaires_siren($content){ function commentaires_liste($content){ $pattern = '/(.*?)(.*)/i'; if(preg_match($pattern, $content, $matches)){ - FB::log($content, 'content'); - FB::log($matches[2], 'li'); switch($matches[2]){ case '+': $class = 'plus';