mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-23 02:19:07 +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) {
|
foreach($this -> attrs as $attr) {
|
||||||
if(($attr -> isUpdate())&&($attr -> isValidate())) {
|
if(($attr -> isUpdate())&&($attr -> isValidate())) {
|
||||||
if(($attr -> name == $this -> getConfig('rdn')) && (!$new)) {
|
if(($attr -> name == $this -> getConfig('rdn')) && (!$new)) {
|
||||||
$new = true;
|
|
||||||
self :: log_debug("$this -> submitChange($idForm): renaming detected");
|
self :: log_debug("$this -> submitChange($idForm): renaming detected");
|
||||||
if (!$this -> fireEvent('before_rename')) {
|
if (!$this -> fireEvent('before_rename')) {
|
||||||
LSerror :: addErrorCode('LSldapObject_16');
|
LSerror :: addErrorCode('LSldapObject_16');
|
||||||
|
@ -650,8 +649,9 @@ class LSldapObject extends LSlog_staticLoggerClass {
|
||||||
$this -> dn = false;
|
$this -> dn = false;
|
||||||
$newDn = $this -> getDn();
|
$newDn = $this -> getDn();
|
||||||
if ($newDn) {
|
if ($newDn) {
|
||||||
self :: log_debug("$this -> submitChange($idForm): Rename me to '$newDn'");
|
self :: log_debug("$this -> submitChange($idForm): Rename me from '$oldDn' to '$newDn'");
|
||||||
if (!LSldap :: move($oldDn,$newDn)) {
|
if (!LSldap :: move($oldDn, $newDn)) {
|
||||||
|
self :: log_error("$this -> submitChange($idForm): Fail to rename me from '$oldDn' to '$newDn'. Stop.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this -> dn = $newDn;
|
$this -> dn = $newDn;
|
||||||
|
|
Loading…
Reference in a new issue