- LSldapObject & LSattribute : Ajout du support des triggers before_create et after_create

au niveau des LSattributes.
This commit is contained in:
Benjamin Renard 2009-03-10 09:22:41 +00:00
parent 5753743d65
commit 8d429bfdcd

View file

@ -563,6 +563,12 @@ class LSldapObject {
LSerror :: addErrorCode('LSldapObject_20'); LSerror :: addErrorCode('LSldapObject_20');
return; return;
} }
foreach ($submitData as $attr_name => $attr) {
if (!$this -> attrs[$attr_name] -> fireEvent('before_create')) {
LSerror :: addErrorCode('LSldapObject_20');
return;
}
}
} }
if (!LSldap :: update($this -> getType(),$dn, $submitData)) { if (!LSldap :: update($this -> getType(),$dn, $submitData)) {
return; return;
@ -572,6 +578,12 @@ class LSldapObject {
LSerror :: addErrorCode('LSldapObject_21'); LSerror :: addErrorCode('LSldapObject_21');
return; return;
} }
foreach ($submitData as $attr_name => $attr) {
if (!$this -> attrs[$attr_name] -> fireEvent('after_create')) {
LSerror :: addErrorCode('LSldapObject_21');
return;
}
}
} }
return true; return true;
} }