From 50c991fe488dd58b65cb36585a53a9b3d4644523 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 19 Sep 2004 16:04:37 +0000 Subject: [PATCH] modified buildUploadAccounts() --- lam/lib/modules.inc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 2ab57333..e83d1766 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -427,12 +427,17 @@ function buildUploadAccounts($scope, $data, $ids) { for ($i = 0; $i < sizeof($data); $i++) $partialAccounts[$i]['objectClasses'] = array(); for ($i = 0; $i < sizeof($ordered); $i++) { $module = new $ordered[$i]($scope); - $errors = $module->build_uploadAccounts($data, $ids, &$partialAccounts); - if (sizeof($errors) > 0) break; + $errors = $module->build_uploadAccounts($data, $ids, $partialAccounts); + if (sizeof($errors) > 0) { + $errors[] = array("ERROR", _("Upload was stopped after errors in $module module!"), ""); + break; + } } - print_r($partialAccounts); - print_r($errors); - return $return; + if (sizeof($errors) > 0) { + for ($i = 0; $i < (($i < sizeof($errors)) || ($i > 49)); $i++) call_user_func_array("StatusMessage", $errors[$i]); + return false; + } + else return $partialAccounts; } /**