better skip algorithm for checkboxes on delete
This commit is contained in:
parent
a5fade8b95
commit
23064b6b7a
|
@ -459,14 +459,17 @@ class lamList {
|
|||
elseif (isset($_POST['del'])){
|
||||
// search for checkboxes
|
||||
$accounts = array_keys($_POST, "on");
|
||||
// skip trans_primary box
|
||||
// skip option boxes
|
||||
$change = false;
|
||||
for ($i = 0; $i < sizeof($accounts); $i++) {
|
||||
if ($accounts[$i] === 'trans_primary') {
|
||||
if (!is_numeric($accounts[$i])) {
|
||||
unset($accounts[$i]);
|
||||
$accounts = array_values($accounts);
|
||||
break;
|
||||
$change = true;
|
||||
}
|
||||
}
|
||||
if ($change) {
|
||||
$accounts = array_values($accounts);
|
||||
}
|
||||
// build DN list
|
||||
$_SESSION['delete_dn'] = array();
|
||||
for ($i = 0; $i < sizeof($accounts); $i++) {
|
||||
|
|
Loading…
Reference in New Issue