]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 11 Jan 2011 15:07:20 +0000 (15:07 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 11 Jan 2011 15:07:20 +0000 (15:07 +0000)
importWs.php

index 81d89e7cf03a0b29a709d2be8bb08aa963bd7acf..66dcfefb4e6adf3938739b7a68cfa21578b85301 100644 (file)
@@ -78,7 +78,11 @@ try {
                $ws2ext = array();\r
                while ($r->fetch()) {\r
                        // On s'occupe de l'entreprise\r
+                       if (trim($r->rs) == '') {\r
+                               $r->rs = trim($r->prenom . ' ' . $r->nom);\r
+                       }\r
                        $nom = mb_strtolower(trim($r->rs));\r
+\r
                        $nom = cubeText::str2URL($nom);\r
                        $email = trim(mb_strtolower($r->email));\r
                        if (isset($entreprises[$nom])) {\r
@@ -163,8 +167,8 @@ try {
                                $ws2ext[$r->admin] = 5;\r
                        }\r
                        $c = $core->con->openCursor('entreprises');\r
-                       $c->ws_admin = $utilisateurs_entreprises[$ws2ext[$r->admin]];\r
-                       $c->update('WHERE entreprise_id=\'' . $ws2ext[$r->uid] . '\'');\r
+                       $c->ws_admin = $ws2ext[$r->admin];\r
+                       $c->update('WHERE entreprise_id=\'' . $utilisateurs_entreprises[$ws2ext[$r->uid]] . '\'');\r
                }\r
        } else {\r
                $ws2ext = array();\r