LSldapObject::submitChange(): code cleaning

This commit is contained in:
Benjamin Renard 2020-12-22 19:46:57 +01:00
parent a353ca5c37
commit 7ef6e57c49

View file

@ -676,8 +676,11 @@ class LSldapObject extends LSlog_staticLoggerClass {
}
if(!empty($submitData)) {
$dn = $this -> getDn();
if (!$dn) {
LSerror :: addErrorCode('LSldapObject_13');
return;
}
if($dn) {
$this -> dn = $dn;
self :: log_debug($this." -> submitChange($idForm): submitData=".varDump($submitData));
if ($new) {
@ -697,6 +700,7 @@ class LSldapObject extends LSlog_staticLoggerClass {
}
}
if (!LSldap :: update($this -> getType(),$dn, $submitData)) {
self :: log_debug($this." -> submitChange($idForm): LSldap :: update() failed");
return;
}
self :: log_debug($this." -> submitChange($idForm): changes applied in LDAP");
@ -714,11 +718,6 @@ class LSldapObject extends LSlog_staticLoggerClass {
}
return true;
}
else {
LSerror :: addErrorCode('LSldapObject_13');
return;
}
}
else {
self :: log_debug($this." -> submitChange($idForm): no change");
return true;