mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-18 08:19:05 +01:00
- LSldapObjet : Ajout de la gestion de l'evenement before_create
This commit is contained in:
parent
90448ef548
commit
5753743d65
1 changed files with 9 additions and 2 deletions
|
@ -558,6 +558,12 @@ class LSldapObject {
|
||||||
if($dn) {
|
if($dn) {
|
||||||
$this -> dn=$dn;
|
$this -> dn=$dn;
|
||||||
LSdebug($submitData);
|
LSdebug($submitData);
|
||||||
|
if ($new) {
|
||||||
|
if (!$this -> fireEvent('before_create')) {
|
||||||
|
LSerror :: addErrorCode('LSldapObject_20');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!LSldap :: update($this -> getType(),$dn, $submitData)) {
|
if (!LSldap :: update($this -> getType(),$dn, $submitData)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1893,8 +1899,9 @@ LSerror :: defineError('LSldapObject_19',
|
||||||
_("LSldapObject : Error during actions to be executed after deleting the objet.")
|
_("LSldapObject : Error during actions to be executed after deleting the objet.")
|
||||||
);
|
);
|
||||||
|
|
||||||
// 20 : not used
|
LSerror :: defineError('LSldapObject_20',
|
||||||
|
_("LSldapObject : Error during the actions to be executed before creating the object.")
|
||||||
|
);
|
||||||
LSerror :: defineError('LSldapObject_21',
|
LSerror :: defineError('LSldapObject_21',
|
||||||
_("LSldapObject : Error during the actions to be executed after creating the object. It was created anyway.")
|
_("LSldapObject : Error during the actions to be executed after creating the object. It was created anyway.")
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue