From e8a916a68bd86a3a67076ff14bc0fdbda4ead134 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 9 Oct 2004 11:08:16 +0000 Subject: [PATCH] fixed error handling in upload code --- lam/lib/modules.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 4caacde6..e4dab4cb 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -474,12 +474,12 @@ function buildUploadAccounts($scope, $data, $ids) { $module = new $ordered[$i]($scope); $errors = $module->build_uploadAccounts($data, $ids, $partialAccounts); 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; } } 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; } else return $partialAccounts;