From: Stéphane Jacob Date: Sun, 14 Dec 2008 17:49:32 +0000 (+0100) Subject: Allows users to add more than one entreprise at the same time (better version). X-Git-Tag: xorg/1.0.0~332^2~344^2~68 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=4cf8b468bf6fee5281f808f5dfb27dc6dfaf4c52;p=platal.git Allows users to add more than one entreprise at the same time (better version). --- 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'] . " | "; } }