fixed error handling in upload code
This commit is contained in:
parent
055b62d3a2
commit
e8a916a68b
|
@ -474,12 +474,12 @@ function buildUploadAccounts($scope, $data, $ids) {
|
||||||
$module = new $ordered[$i]($scope);
|
$module = new $ordered[$i]($scope);
|
||||||
$errors = $module->build_uploadAccounts($data, $ids, $partialAccounts);
|
$errors = $module->build_uploadAccounts($data, $ids, $partialAccounts);
|
||||||
if (sizeof($errors) > 0) {
|
if (sizeof($errors) > 0) {
|
||||||
$errors[] = array("ERROR", _("Upload was stopped after errors in $module module!"), "");
|
$errors[] = array("ERROR", _("Upload was stopped after errors in %s module!"), "", array($module->get_alias()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sizeof($errors) > 0) {
|
if (sizeof($errors) > 0) {
|
||||||
for ($i = 0; $i < (($i < sizeof($errors)) || ($i > 49)); $i++) call_user_func_array("StatusMessage", $errors[$i]);
|
for ($i = 0; (($i < sizeof($errors)) || ($i > 49)); $i++) call_user_func_array("StatusMessage", $errors[$i]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else return $partialAccounts;
|
else return $partialAccounts;
|
||||||
|
|
Loading…
Reference in New Issue