mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 18:09:06 +01:00
LSldapObject : fix onModify triggers execution
This commit is contained in:
parent
ea5c120b75
commit
421d7f4dce
1 changed files with 13 additions and 11 deletions
|
@ -341,13 +341,24 @@ class LSldapObject {
|
||||||
|
|
||||||
// $this -> attrs[ {inNewData} ] -> fireEvent('before_modify')
|
// $this -> attrs[ {inNewData} ] -> fireEvent('before_modify')
|
||||||
foreach($new_data as $attr_name => $attr_val) {
|
foreach($new_data as $attr_name => $attr_val) {
|
||||||
if (!$this -> attrs[$attr_name] -> fireEvent('before_modify')) {
|
if ($this -> attrs[$attr_name] -> isUpdate() && !$this -> attrs[$attr_name] -> fireEvent('before_modify')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this -> submitChange($idForm)) {
|
if ($this -> submitChange($idForm)) {
|
||||||
LSdebug('Les modifications sont submitées');
|
LSdebug('Les modifications sont submitées');
|
||||||
|
// Event After Modify
|
||||||
|
if(!$this -> submitError) {
|
||||||
|
$this -> fireEvent('after_modify');
|
||||||
|
}
|
||||||
|
|
||||||
|
// $this -> attrs[*] => After Modify
|
||||||
|
foreach($new_data as $attr_name => $attr_val) {
|
||||||
|
if ($this -> attrs[$attr_name] -> isUpdate()) {
|
||||||
|
$this -> attrs[$attr_name] -> fireEvent('after_modify');
|
||||||
|
}
|
||||||
|
}
|
||||||
$this -> submitError = false;
|
$this -> submitError = false;
|
||||||
$this -> reloadData();
|
$this -> reloadData();
|
||||||
$this -> refreshForm($idForm);
|
$this -> refreshForm($idForm);
|
||||||
|
@ -355,16 +366,7 @@ class LSldapObject {
|
||||||
else {
|
else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Event After Modify
|
|
||||||
if(!$this -> submitError) {
|
|
||||||
$this -> fireEvent('after_modify');
|
|
||||||
}
|
|
||||||
|
|
||||||
// $this -> attrs[*] => After Modify
|
|
||||||
foreach($new_data as $attr_name => $attr_val) {
|
|
||||||
$this -> attrs[$attr_name] -> fireEvent('after_modify');
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue