From: konrad Date: Mon, 10 Mar 2008 18:16:09 +0000 (+0000) Subject: fix: creation of customers with positive IDs X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=f0d5bc2d463a155b8094926f124826d9ad496f00;p=web%2Fkonrad%2Fsmoke.git fix: creation of customers with positive IDs git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@113 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- diff --git a/www/inc/classes/customer.php b/www/inc/classes/customer.php index cfc3483..ed21420 100644 --- a/www/inc/classes/customer.php +++ b/www/inc/classes/customer.php @@ -294,11 +294,13 @@ function setCustomerXml($xmldata) if($id>=0){ $db->update("customer",$dt,"customerid=".$db->escapeInt($id)); + header("X-MagicSmoke-Status: Ok"); + print($id); }else{ - $dt["customerid"]=$id; - $db->insert("customer",$dt); + $id=$db->insert("customer",$dt); + header("X-MagicSmoke-Status: Ok"); + print($id); } - header("X-MagicSmoke-Status: Ok"); } ?> \ No newline at end of file