- LSldapObject : Ajout de fireEvent sur les LSattributes de l'objet

dans les méthodes beforeDelete() et afterDelete()
- Config. LSeepeople : oubli generate_sambaSID() -> generate_sambaUserSID()
This commit is contained in:
Benjamin Renard 2009-01-22 15:35:37 +00:00
parent 6957badce8
commit e5480740cf
2 changed files with 16 additions and 2 deletions

View file

@ -325,7 +325,7 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'ldap_type' => 'ascii', 'ldap_type' => 'ascii',
'html_type' => 'text', 'html_type' => 'text',
'required' => 1, 'required' => 1,
'generate_function' => 'generate_sambaSID', 'generate_function' => 'generate_sambaUserSID',
'rights' => array( 'rights' => array(
'admin' => 'r' 'admin' => 'r'
), ),

View file

@ -1226,7 +1226,15 @@ class LSldapObject {
* @retval True en cas de cas ce succès, False sinon. * @retval True en cas de cas ce succès, False sinon.
*/ */
function beforeDelete() { function beforeDelete() {
return $this -> updateLSrelationsCache(); $return = $this -> updateLSrelationsCache();
foreach(array_keys($this -> attrs) as $attr_name) {
if (!$this -> attrs[$attr_name] -> fireEvent('before_delete')) {
$return = false;
}
}
return $return;
} }
/** /**
@ -1277,6 +1285,12 @@ class LSldapObject {
} }
} }
foreach(array_keys($this -> attrs) as $attr_name) {
if (!$this -> attrs[$attr_name] -> fireEvent('after_delete')) {
$error = true;
}
}
return !$error; return !$error;
} }