From: vincent@cubedesigners.com Date: Tue, 11 Jan 2011 15:07:20 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ba85ece31cee07fd9b797c167bf5e1ea3bab9f37;p=cubeextranet.git --- diff --git a/importWs.php b/importWs.php index 81d89e7cf..66dcfefb4 100644 --- a/importWs.php +++ b/importWs.php @@ -78,7 +78,11 @@ try { $ws2ext = array(); while ($r->fetch()) { // On s'occupe de l'entreprise + if (trim($r->rs) == '') { + $r->rs = trim($r->prenom . ' ' . $r->nom); + } $nom = mb_strtolower(trim($r->rs)); + $nom = cubeText::str2URL($nom); $email = trim(mb_strtolower($r->email)); if (isset($entreprises[$nom])) { @@ -163,8 +167,8 @@ try { $ws2ext[$r->admin] = 5; } $c = $core->con->openCursor('entreprises'); - $c->ws_admin = $utilisateurs_entreprises[$ws2ext[$r->admin]]; - $c->update('WHERE entreprise_id=\'' . $ws2ext[$r->uid] . '\''); + $c->ws_admin = $ws2ext[$r->admin]; + $c->update('WHERE entreprise_id=\'' . $utilisateurs_entreprises[$ws2ext[$r->uid]] . '\''); } } else { $ws2ext = array();