mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-23 02:19:07 +01:00
LSldapObject::submitChange(): code cleaning
This commit is contained in:
parent
a353ca5c37
commit
7ef6e57c49
1 changed files with 39 additions and 40 deletions
|
@ -675,10 +675,13 @@ class LSldapObject extends LSlog_staticLoggerClass {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!empty($submitData)) {
|
if(!empty($submitData)) {
|
||||||
$dn=$this -> getDn();
|
$dn = $this -> getDn();
|
||||||
|
if (!$dn) {
|
||||||
|
LSerror :: addErrorCode('LSldapObject_13');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if($dn) {
|
$this -> dn = $dn;
|
||||||
$this -> dn=$dn;
|
|
||||||
self :: log_debug($this." -> submitChange($idForm): submitData=".varDump($submitData));
|
self :: log_debug($this." -> submitChange($idForm): submitData=".varDump($submitData));
|
||||||
if ($new) {
|
if ($new) {
|
||||||
// Check DN is not already exist
|
// Check DN is not already exist
|
||||||
|
@ -697,6 +700,7 @@ class LSldapObject extends LSlog_staticLoggerClass {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!LSldap :: update($this -> getType(),$dn, $submitData)) {
|
if (!LSldap :: update($this -> getType(),$dn, $submitData)) {
|
||||||
|
self :: log_debug($this." -> submitChange($idForm): LSldap :: update() failed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self :: log_debug($this." -> submitChange($idForm): changes applied in LDAP");
|
self :: log_debug($this." -> submitChange($idForm): changes applied in LDAP");
|
||||||
|
@ -714,11 +718,6 @@ class LSldapObject extends LSlog_staticLoggerClass {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
LSerror :: addErrorCode('LSldapObject_13');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
self :: log_debug($this." -> submitChange($idForm): no change");
|
self :: log_debug($this." -> submitChange($idForm): no change");
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue