mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-03 11:59:16 +01:00
* Addressbook/LDAP|SQL->LDAP: fixed error during creation of new contacts, SQL->LDAP now also displays LDAP errors
This commit is contained in:
parent
774bcf0037
commit
9a8dcc6eb4
@ -502,7 +502,7 @@ class addressbook_ldap
|
|||||||
|
|
||||||
if (!@ldap_modify($this->ds, $dn, $ldapContact))
|
if (!@ldap_modify($this->ds, $dn, $ldapContact))
|
||||||
{
|
{
|
||||||
//echo "<p>ldap_modify($this->ds,'$dn',".print_r($ldapContact,true).")</p>\n";
|
//echo "<p>ldap_modify($this->ds,'$dn',".print_r($ldapContact,true).') failed errorcode: '. ldap_errno($this->ds) .' ('. ldap_error($this->ds) .")</p>\n";
|
||||||
error_log('class.so_ldap.inc.php ('. __LINE__ .') update of '. $dn .' failed errorcode: '. ldap_errno($this->ds) .' ('. ldap_error($this->ds) .')');
|
error_log('class.so_ldap.inc.php ('. __LINE__ .') update of '. $dn .' failed errorcode: '. ldap_errno($this->ds) .' ('. ldap_error($this->ds) .')');
|
||||||
error_log(print_r($ldapContact,true));
|
error_log(print_r($ldapContact,true));
|
||||||
return $this->_error(__LINE__);
|
return $this->_error(__LINE__);
|
||||||
@ -511,12 +511,13 @@ class addressbook_ldap
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$dn = 'uid='. ldap::quote($ldapContact['uid']) .','. $baseDN;
|
$dn = 'uid='. ldap::quote($ldapContact['uid']) .','. $baseDN;
|
||||||
|
unset($ldapContact['entryuuid']); // trying to write it, gives an error
|
||||||
|
|
||||||
if (!@ldap_add($this->ds, $dn, $ldapContact))
|
if (!@ldap_add($this->ds, $dn, $ldapContact))
|
||||||
{
|
{
|
||||||
//echo "<p>ldap_add($this->ds,'$dn',".print_r($ldapContact,true).")</p>\n";
|
//echo "<p>ldap_add($this->ds,'$dn',".array2string($ldapContact).") failed errorcode: ".ldap_errno($this->ds) .' ('. ldap_error($this->ds) .")</p>\n";
|
||||||
error_log('class.so_ldap.inc.php ('. __LINE__ .') add of '. $dn .' failed errorcode: '. ldap_errno($this->ds) .' ('. ldap_error($this->ds) .')');
|
error_log('class.so_ldap.inc.php ('. __LINE__ .') add of '. $dn .' failed errorcode: '. ldap_errno($this->ds) .' ('. ldap_error($this->ds) .')');
|
||||||
error_log(print_r($ldapContact,true));
|
error_log(array2string($ldapContact));
|
||||||
return $this->_error(__LINE__);
|
return $this->_error(__LINE__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -991,7 +992,7 @@ class addressbook_ldap
|
|||||||
if(!@ldap_add($adminDS, $dn, $data))
|
if(!@ldap_add($adminDS, $dn, $data))
|
||||||
{
|
{
|
||||||
//echo "<p>ldap_add($adminDS,'$dn',".print_r($data,true).")</p>\n";
|
//echo "<p>ldap_add($adminDS,'$dn',".print_r($data,true).")</p>\n";
|
||||||
$err = $this->_error(__LINE__,$adminDS);
|
$err = lang("Can't create dn %1",$dn).': '.$this->_error(__LINE__,$adminDS);
|
||||||
$adminLDAP->ldapDisconnect();
|
$adminLDAP->ldapDisconnect();
|
||||||
return $err;
|
return $err;
|
||||||
}
|
}
|
||||||
|
@ -530,7 +530,7 @@ class addressbook_so
|
|||||||
// which need to be the account_lid for accounts!
|
// which need to be the account_lid for accounts!
|
||||||
$data['id'] = $GLOBALS['egw']->accounts->id2name($contact['account_id']);
|
$data['id'] = $GLOBALS['egw']->accounts->id2name($contact['account_id']);
|
||||||
}
|
}
|
||||||
ExecMethod('addressbook.addressbook_ldap.save',$data);
|
$error_nr = ExecMethod('addressbook.addressbook_ldap.save',$data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -582,7 +582,7 @@ class addressbook_so
|
|||||||
function &search($criteria,$only_keys=True,$order_by='',$extra_cols='',$wildcard='',$empty=False,$op='AND',$start=false,$filter=null,$join='')
|
function &search($criteria,$only_keys=True,$order_by='',$extra_cols='',$wildcard='',$empty=False,$op='AND',$start=false,$filter=null,$join='')
|
||||||
{
|
{
|
||||||
//echo '<p>'.__METHOD__.'('.array2string($criteria,true).','.array2string($only_keys).",'$order_by','$extra_cols','$wildcard','$empty','$op',$start,".array2string($filter,true).",'$join')</p>\n";
|
//echo '<p>'.__METHOD__.'('.array2string($criteria,true).','.array2string($only_keys).",'$order_by','$extra_cols','$wildcard','$empty','$op',$start,".array2string($filter,true).",'$join')</p>\n";
|
||||||
//error_log(__METHOD__.'('.array2string($criteria,true).','.array2string($only_keys).",'$order_by','$extra_cols','$wildcard','$empty','$op',$start,".array2string($filter,true).",'$join')");
|
//error_log(__METHOD__.'('.array2string($criteria,true).','.array2string($only_keys).",'$order_by','$extra_cols','$wildcard','$empty','$op',".array2string($start).','.array2string($filter,true).",'$join')");
|
||||||
|
|
||||||
// Handle 'None' country option
|
// Handle 'None' country option
|
||||||
if(is_array($filter) && $filter['adr_one_countrycode'] == '-custom-')
|
if(is_array($filter) && $filter['adr_one_countrycode'] == '-custom-')
|
||||||
|
Loading…
Reference in New Issue
Block a user