X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fentreprises.inc.php;h=635173d3e5be603c2ae1ea9f677c9b2fc1cf6854;hb=a0ad593aec01fe6387ee83f3ef487bcdc3c3c5bd;hp=a16bc7d0b1cb6951a00959c9ba5af656da7590ca;hpb=543b59ccbecdf438b99b888ed775f48046bb9981;p=platal.git diff --git a/include/validations/entreprises.inc.php b/include/validations/entreprises.inc.php index a16bc7d..635173d 100644 --- a/include/validations/entreprises.inc.php +++ b/include/validations/entreprises.inc.php @@ -1,6 +1,6 @@ id = $_id; $this->name = $_name; $this->acronym = $_acronym; @@ -54,8 +54,7 @@ class EntrReq extends Validate $this->tel = $_tel; $this->fax = $_fax; - $separators = array("&", "(", ")", "-", "_", ",", ";", ".", ":", "/", "\\", "\'", "\""); - $replacement = array(" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "); + $_name = preg_replace('/[^0-9a-z]/i', ' ', strtolower(replace_accent($_name))); $name = explode(" ", $_name); $name_array = array_map("trim", $name); $length = count($name_array); @@ -74,7 +73,6 @@ class EntrReq extends Validate . $where); $this->suggestions = "| "; while ($sug = $res->next()) { - var_dump($sug); $this->suggestions .= $sug['name'] . " | "; } }