added preDeleteActions()
This commit is contained in:
parent
f20325c0e0
commit
896c8f89d4
|
@ -140,9 +140,20 @@ if ($_POST['delete']) {
|
||||||
// First load DN.
|
// First load DN.
|
||||||
$_SESSION['account']->load_account($_SESSION['delete_dn'][$m]);
|
$_SESSION['account']->load_account($_SESSION['delete_dn'][$m]);
|
||||||
// get commands and changes of each attribute
|
// get commands and changes of each attribute
|
||||||
$module = array_keys ($_SESSION['account']->module);
|
$module = array_keys($_SESSION['account']->module);
|
||||||
$attributes = array();
|
$attributes = array();
|
||||||
$errors = 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
|
// load attributes
|
||||||
foreach ($module as $singlemodule) {
|
foreach ($module as $singlemodule) {
|
||||||
// load changes
|
// load changes
|
||||||
|
@ -197,12 +208,13 @@ if ($_POST['delete']) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (!$stopprocessing) {
|
if (!$stopprocessing) {
|
||||||
$errors = deleteDN($_SESSION['delete_dn'][$m]);
|
$errors = deleteDN($_SESSION['delete_dn'][$m]);
|
||||||
if (sizeof($errors) > 0) $stopprocessing = true;
|
if (sizeof($errors) > 0) $stopprocessing = true;
|
||||||
}
|
}
|
||||||
if (!$stopprocessing) {
|
|
||||||
// post delete actions
|
// post delete actions
|
||||||
|
if (!$stopprocessing) {
|
||||||
foreach ($module as $singlemodule) {
|
foreach ($module as $singlemodule) {
|
||||||
$_SESSION['account']->module[$singlemodule]->postDeleteActions();
|
$_SESSION['account']->module[$singlemodule]->postDeleteActions();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue