mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-23 00:43:48 +01:00
LSldapObject::submitChange(): fix error renaming LSobject
Old RDN value was keep and block the update ot the other changed attributes.
This commit is contained in:
parent
fadfe2d2ba
commit
29e499e1d6
1 changed files with 3 additions and 3 deletions
|
@ -640,7 +640,6 @@ class LSldapObject extends LSlog_staticLoggerClass {
|
|||
foreach($this -> attrs as $attr) {
|
||||
if(($attr -> isUpdate())&&($attr -> isValidate())) {
|
||||
if(($attr -> name == $this -> getConfig('rdn')) && (!$new)) {
|
||||
$new = true;
|
||||
self :: log_debug("$this -> submitChange($idForm): renaming detected");
|
||||
if (!$this -> fireEvent('before_rename')) {
|
||||
LSerror :: addErrorCode('LSldapObject_16');
|
||||
|
@ -650,8 +649,9 @@ class LSldapObject extends LSlog_staticLoggerClass {
|
|||
$this -> dn = false;
|
||||
$newDn = $this -> getDn();
|
||||
if ($newDn) {
|
||||
self :: log_debug("$this -> submitChange($idForm): Rename me to '$newDn'");
|
||||
if (!LSldap :: move($oldDn,$newDn)) {
|
||||
self :: log_debug("$this -> submitChange($idForm): Rename me from '$oldDn' to '$newDn'");
|
||||
if (!LSldap :: move($oldDn, $newDn)) {
|
||||
self :: log_error("$this -> submitChange($idForm): Fail to rename me from '$oldDn' to '$newDn'. Stop.");
|
||||
return;
|
||||
}
|
||||
$this -> dn = $newDn;
|
||||
|
|
Loading…
Reference in a new issue