fixed error output
This commit is contained in:
parent
d4710f6141
commit
915135b3ce
lam/templates
|
@ -130,8 +130,12 @@ if ($_FILES['inputfile'] && ($_FILES['inputfile']['size'] > 0)) {
|
|||
for ($i = 0; $i < sizeof($invalidColumns); $i++) {
|
||||
$errors[] = array(_("One or more values of the required column \"$invalidColumns[$i]\" are missing."), "");
|
||||
}
|
||||
// if input data is invalid just display error messages (max 50)
|
||||
if (sizeof($errors) > 0) {
|
||||
for ($i = 0; $i < sizeof($errors); $i++) StatusMessage("ERROR", $errors[$i][0], $errors[$i][1]);
|
||||
}
|
||||
// let modules build accounts
|
||||
if (sizeof($errors) < 1) {
|
||||
else {
|
||||
$accounts = buildUploadAccounts($_POST['scope'], $data, $ids);
|
||||
if ($accounts != false) {
|
||||
// set DN
|
||||
|
@ -145,13 +149,6 @@ if ($_FILES['inputfile'] && ($_FILES['inputfile']['size'] > 0)) {
|
|||
$accounts[$i]['dn'] = $account_dn;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if input data is invalid just display error messages (max 50)
|
||||
if (sizeof($errors) > 0) {
|
||||
for ($i = 0; (($i < sizeof($errors)) || ($i > 49)); $i++) StatusMessage("ERROR", $errors[$i][0], $errors[$i][1]);
|
||||
}
|
||||
else {
|
||||
// store accounts in session
|
||||
$_SESSION['mass_accounts'] = $_SESSION['ldap']->encrypt(serialize($accounts));
|
||||
$_SESSION['mass_counter'] = 0;
|
||||
|
@ -170,6 +167,7 @@ if ($_FILES['inputfile'] && ($_FILES['inputfile']['size'] > 0)) {
|
|||
echo "</tr></table>\n";
|
||||
echo "</p>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "</body>\n";
|
||||
|
|
Loading…
Reference in New Issue