X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/9dda820f45ce31c9c42902d61949d7679d2de94a..85422b200b3327de9a5c7b0d550d9afc6fb62286:/lxo-import/import_lib.php diff --git a/lxo-import/import_lib.php b/lxo-import/import_lib.php index 9678472bf..d8b2259c1 100644 --- a/lxo-import/import_lib.php +++ b/lxo-import/import_lib.php @@ -173,7 +173,7 @@ global $db,$file,$test; if ($test) { return "#####"; } $sql1="select * from defaults"; $sql2="update defaults set ".$file."number = '%s'"; - $db->lock(); + $db->begin(); $rs=$db->getAll($sql1); $nr=$rs[0][$file."number"]; preg_match("/^([^0-9]*)([0-9]+)/",$nr,$hits); @@ -363,10 +363,14 @@ function authuser($dbhost,$dbport,$dbuser,$dbpasswd,$dbname,$cookie) { $db->query($sql2,"authuser_B"); $sql3="insert into session ";*/ } + $sql="select * from auth.user where id=".$rs[0]["id"]; + $rs1=$db->getAll($sql,"authuser_1"); + if (!$rs1) return false; + $auth=array(); + $auth["login"]=$rs1[0]["login"]; $sql="select * from auth.user_config where user_id=".$rs[0]["id"]; $rs1=$db->getAll($sql,"authuser_2"); - $auth=array(); - $keys=array("login","dbname","dbpasswd","dbhost","dbport","dbuser"); + $keys=array("dbname","dbpasswd","dbhost","dbport","dbuser"); foreach ($rs1 as $row) { if (in_array($row["cfg_key"],$keys)) { $auth[$row["cfg_key"]]=$row["cfg_value"];