From 4cf8b468bf6fee5281f808f5dfb27dc6dfaf4c52 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sun, 14 Dec 2008 18:49:32 +0100 Subject: [PATCH] Allows users to add more than one entreprise at the same time (better version). --- include/validations/entreprises.inc.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/validations/entreprises.inc.php b/include/validations/entreprises.inc.php index a329eaa..5f6e1be 100644 --- a/include/validations/entreprises.inc.php +++ b/include/validations/entreprises.inc.php @@ -54,7 +54,7 @@ class EntrReq extends Validate $this->tel = $_tel; $this->fax = $_fax; - $_name = str_replace(array("&", "(", ")", "-", "_", ",", ";", ".", ":", "/", "\\", "\'", "\""), " ", $_name); + $_name = preg_replace('/[^0-9a-z]/i', ' ', strtolower(replace_accent($_name))); $name = explode(" ", $_name); $name_array = array_map("trim", $name); $length = count($name_array); @@ -73,7 +73,6 @@ class EntrReq extends Validate . $where); $this->suggestions = "| "; while ($sug = $res->next()) { - var_dump($sug); $this->suggestions .= $sug['name'] . " | "; } } -- 2.1.4