Beim Update hat sich noch ein Bug eingeschlichen, da werden die ldap infos zweimal gesetzt.
Index: classes/cmdb/dao/category/specific/isys_cmdb_dao_category_s_person_master.class.php =================================================================== --- classes/cmdb/dao/category/specific/isys_cmdb_dao_category_s_person_master.class.php (Revision 37) +++ classes/cmdb/dao/category/specific/isys_cmdb_dao_category_s_person_master.class.php (Arbeitskopie) @@ -122,15 +122,14 @@ "isys_cats_person_list__fax = ".$this->convert_sql_text($p_fax).", ". "isys_cats_person_list__department = ".$this->convert_sql_text($p_department).", ". "isys_cats_person_list__isys_connection__id = ".$this->convert_sql_id($l_id).", ". - "isys_cats_person_list__isys_ldap__id = ".$this->convert_sql_id($p_ldap_server).", ". - "isys_cats_person_list__ldap_dn = ".$this->convert_sql_text($p_ldap_dn).", ". "isys_cats_person_list__description = ".$this->convert_sql_text($p_description).", "; - if ($p_ldap_dn) { + if ($p_ldap_dn>"") $l_sql .= "isys_cats_person_list__ldap_dn = ".$this->convert_sql_text($p_ldap_dn).", "; - $l_sql .= "isys_cats_person_list__isys_ldap__id = ".$this->convert_sql_text($p_ldap_server).", "; - } - + + if ($p_ldap_server > 0) + $l_sql .= "isys_cats_person_list__isys_ldap__id = ".$this->convert_sql_id($p_ldap_server).", "; + $l_sql .= "isys_cats_person_list__status = ".$this->convert_sql_id($p_status)." "; $l_sql .= "WHERE isys_cats_person_list__id = ".$this->convert_sql_id($p_id); @@ -170,11 +169,11 @@ "isys_cats_person_list__isys_obj__id = '".$p_obj_id."', ". "isys_cats_person_list__description = ".$this->convert_sql_text($p_description).", "; - if ($p_ldap_dn) + if ($p_ldap_dn>"") $l_sql .= "isys_cats_person_list__ldap_dn = ".$this->convert_sql_text($p_ldap_dn).", "; if ($p_ldap_server > 0) - $l_sql .= "isys_cats_person_list__isys_ldap__id = ".$this->convert_sql_text($p_ldap_server).", "; + $l_sql .= "isys_cats_person_list__isys_ldap__id = ".$this->convert_sql_id($p_ldap_server).", "; $l_sql .= "isys_cats_person_list__status = ".$this->convert_sql_id($p_status)." ";wer nicht will, dass die ldap-Einträge die Felder in der DB überschreiben, kann diesen patch nutzen
Index: classes/cmdb/ui/specific/isys_cmdb_ui_category_s_person.class.php =================================================================== --- classes/cmdb/ui/specific/isys_cmdb_ui_category_s_person.class.php (Revision 37) +++ classes/cmdb/ui/specific/isys_cmdb_ui_category_s_person.class.php (Arbeitskopie) @@ -67,17 +67,25 @@ $p_data["ldap_cn"] = $l_ar["cn"][0]; - $p_data["isys_cats_person_list__mail_address"] = $l_ar["mail"][0]; + if($p_data["isys_cats_person_list__mail_address"]=="") + $p_data["isys_cats_person_list__mail_address"] = $l_ar["mail"][0]; - $p_data["isys_cats_person_list__fist_name"] = utf8_decode($l_ar["givenname"][0]); - $p_data["isys_cats_person_list__last_name"] = utf8_decode($l_ar["sn"][0]); + if($p_data["isys_cats_person_list__fist_name"]=="") + $p_data["isys_cats_person_list__fist_name"] = utf8_decode($l_ar["givenname"][0]); + if($p_data["isys_cats_person_list__last_name"]=="") + $p_data["isys_cats_person_list__last_name"] = utf8_decode($l_ar["sn"][0]); - $p_data["isys_cats_person_list__phone_company"] = $l_ar["telephonenumber"][0]; - $p_data["isys_cats_person_list__phone_mobile"] = $l_ar["mobile"][0]; - $p_data["isys_cats_person_list__phone_home"] = $l_ar["homephone"][0]; - $p_data["isys_cats_person_list__fax"] = $l_ar["facsimiletelephonenumber"][0]; + if($p_data["isys_cats_person_list__phone_company"]=="") + $p_data["isys_cats_person_list__phone_company"] = $l_ar["telephonenumber"][0]; + if($p_data["isys_cats_person_list__phone_mobile"]=="") + $p_data["isys_cats_person_list__phone_mobile"] = $l_ar["mobile"][0]; + if($p_data["isys_cats_person_list__phone_home"]=="") + $p_data["isys_cats_person_list__phone_home"] = $l_ar["homephone"][0]; + if($p_data["isys_cats_person_list__fax"]=="") + $p_data["isys_cats_person_list__fax"] = $l_ar["facsimiletelephonenumber"][0]; - $p_data["isys_cats_person_list__department"] = utf8_decode($l_ar["department"][0]); + if($p_data["isys_cats_person_list__department"]=="") + $p_data["isys_cats_person_list__department"] = utf8_decode($l_ar["department"][0]); $p_data["ldap_company"] = $l_ar["company"][0]; $p_data["ldap_description"] = $l_ar["description"][0];