fix name heuristic in delivery-address parsing
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sat, 1 Jan 2011 15:53:51 +0000 (15:53 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sat, 1 Jan 2011 15:53:51 +0000 (15:53 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@700 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

www/inc/db/dbupgrade.php

index 3f59ad9..5bb0013 100644 (file)
@@ -289,7 +289,9 @@ class DBUpgrade
                        if(count($res)>0)$ord["invoiceaddress"]=$res[0]["addressid"];
                        //process deliveryaddr
                        if(!$db->isNull($ord["deliveryaddress"])){
-                               $a=self::mkaddress($ord["customerid"],$ord["deliveryaddress"]);
+                               $iaaddr=explode("\n",$ord["deliveryaddress"]);
+                               $ianame=array_shift($iaaddr);
+                               $a=self::mkaddress($ord["customerid"], implode("\n",$iaaddr), trim($ianame));
                                if($a===false)unset($ord["deliveryaddress"]);
                                else $ord["deliveryaddress"]=$a;
                        }else