added preDeleteActions()

This commit is contained in:
Roland Gruber 2007-02-25 13:51:40 +00:00
parent f20325c0e0
commit 896c8f89d4
1 changed files with 59 additions and 47 deletions

View File

@ -140,9 +140,20 @@ if ($_POST['delete']) {
// First load DN.
$_SESSION['account']->load_account($_SESSION['delete_dn'][$m]);
// get commands and changes of each attribute
$module = array_keys ($_SESSION['account']->module);
$module = array_keys($_SESSION['account']->module);
$attributes = array();
$errors = array();
// predelete actions
if (!$stopprocessing) {
foreach ($module as $singlemodule) {
$success = $_SESSION['account']->module[$singlemodule]->preDeleteActions();
if (!$success) {
$stopprocessing = true;
break;
}
}
}
if (!$stopprocessing) {
// load attributes
foreach ($module as $singlemodule) {
// load changes
@ -197,12 +208,13 @@ if ($_POST['delete']) {
}
}
}
}
if (!$stopprocessing) {
$errors = deleteDN($_SESSION['delete_dn'][$m]);
if (sizeof($errors) > 0) $stopprocessing = true;
}
if (!$stopprocessing) {
// post delete actions
if (!$stopprocessing) {
foreach ($module as $singlemodule) {
$_SESSION['account']->module[$singlemodule]->postDeleteActions();
}