From: x2000coic Date: Sat, 18 Sep 2004 17:25:30 +0000 (+0000) Subject: fix : registration rejected people with several name separated by spaces X-Git-Tag: xorg/old~1528 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=c715da8807be2e24364ecca4f683e55d84a5a1e7;p=platal.git fix : registration rejected people with several name separated by spaces --- diff --git a/include/identification.inc.php b/include/identification.inc.php index 3383196..2e3093c 100644 --- a/include/identification.inc.php +++ b/include/identification.inc.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: identification.inc.php,v 1.7 2004-09-06 09:59:00 x2000habouzit Exp $ + $Id: identification.inc.php,v 1.8 2004-09-18 17:25:30 x2000coic Exp $ ***************************************************************************/ require_once('xorg.misc.inc.php'); @@ -36,8 +36,8 @@ if ($promo<1900 || $promo>2100) { } /* on recupere les donnees */ -$prenom = preg_replace('/ +/','',trim(strip_request('prenom'))); -$nom = preg_replace('/ +/','',trim(strip_request('nom'))); +$prenom = preg_replace('/ +/',' ',trim(strip_request('prenom'))); +$nom = preg_replace('/ +/',' ',trim(strip_request('nom'))); // majuscules pour nom et prenom $nom = strtoupper(replace_accent($nom)); @@ -115,9 +115,8 @@ if ($promo > 1995) { $sql = "SELECT nom,prenom,matricule FROM identification WHERE promo='$promo' AND deces=0"; $result = $globals->db->query($sql); $autorisation = FALSE; - + if (strlen($chaine2)>0) { // il existe au moins 2 chaines - while (list($mynom,$myprenom,$mymat) = mysql_fetch_array($result)) { // verification de toute la promo ! $mynomup=strtoupper(replace_accent($mynom));