mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 14:33:49 +01:00
- LSldap : Ajout des messages d'erreurs Net_LDAP2 lors des remove() et
des move().
This commit is contained in:
parent
c78a95c1d5
commit
83922b5522
2 changed files with 17 additions and 2 deletions
|
@ -54,6 +54,10 @@ $GLOBALS['LSerror_code'] = array (
|
|||
'msg' => _("LSldap : Erreur durant la suppression des attributs vides."),
|
||||
'level' => 'w'
|
||||
),
|
||||
7 => array (
|
||||
'msg' => _("LSldap : Erreur durant le changement du DN de l'objet."),
|
||||
'level' => 'w'
|
||||
),
|
||||
|
||||
// LSldapObject
|
||||
21 => array (
|
||||
|
|
|
@ -334,7 +334,12 @@ class LSldap {
|
|||
* @retval boolean True si l'objet à été supprimé, false sinon
|
||||
*/
|
||||
function remove($dn) {
|
||||
return $this -> cnx -> delete($dn,array('recursive' => true));
|
||||
$ret = $this -> cnx -> delete($dn,array('recursive' => true));
|
||||
if (Net_LDAP2::isError($ret)) {
|
||||
$GLOBALS['LSerror'] -> addErrorCode(0,'NetLdap-Error : '.$ret->getMessage());
|
||||
return;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -346,7 +351,13 @@ class LSldap {
|
|||
* @retval boolean True si l'objet a été déplacé, false sinon
|
||||
*/
|
||||
function move($old,$new) {
|
||||
return (!Net_LDAP2::isError($this -> cnx -> move($old,$new)));
|
||||
$ret = $this -> cnx -> move($old,$new);
|
||||
if (Net_LDAP2::isError($ret)) {
|
||||
$GLOBALS['LSerror'] -> addErrorCode(7);
|
||||
$GLOBALS['LSerror'] -> addErrorCode(0,'NetLdap-Error : '.$ret->getMessage());
|
||||
return;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue