From f84b006051ecd2be82affe41a928f0914c928b9e Mon Sep 17 00:00:00 2001 From: konrad Date: Sat, 1 Jan 2011 15:53:51 +0000 Subject: [PATCH] fix name heuristic in delivery-address parsing git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@700 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- www/inc/db/dbupgrade.php | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/www/inc/db/dbupgrade.php b/www/inc/db/dbupgrade.php index 3f59ad9..5bb0013 100644 --- a/www/inc/db/dbupgrade.php +++ b/www/inc/db/dbupgrade.php @@ -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 -- 1.7.2.5