fixed optional upload values

This commit is contained in:
Roland Gruber 2005-06-07 18:19:48 +00:00
parent ca823bf0f5
commit b7cbe60f61
1 changed files with 90 additions and 70 deletions

View File

@ -507,7 +507,8 @@ class inetOrgPerson extends baseModule {
$triggered_messages[] = $errMsg; $triggered_messages[] = $errMsg;
} }
// first name // first name
if (($rawAccounts[$i][$ids['inetOrgPerson_firstName']] != "") && get_preg($rawAccounts[$i][$ids['inetOrgPerson_firstName']], 'realname')) { if ($rawAccounts[$i][$ids['inetOrgPerson_firstName']] != "") {
if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_firstName']], 'realname')) {
$partialAccounts[$i]['givenName'] = $rawAccounts[$i][$ids['inetOrgPerson_firstName']]; $partialAccounts[$i]['givenName'] = $rawAccounts[$i][$ids['inetOrgPerson_firstName']];
} }
else { else {
@ -515,6 +516,7 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i)); array_push($errMsg, array($i));
$triggered_messages[] = $errMsg; $triggered_messages[] = $errMsg;
} }
}
// description // description
if ($rawAccounts[$i][$ids['inetOrgPerson_description']] != "") { if ($rawAccounts[$i][$ids['inetOrgPerson_description']] != "") {
$partialAccounts[$i]['description'] = $rawAccounts[$i][$ids['inetOrgPerson_description']]; $partialAccounts[$i]['description'] = $rawAccounts[$i][$ids['inetOrgPerson_description']];
@ -528,7 +530,8 @@ class inetOrgPerson extends baseModule {
} }
} }
// title // title
if (($rawAccounts[$i][$ids['inetOrgPerson_title']] != "") && get_preg($rawAccounts[$i][$ids['inetOrgPerson_title']], 'title')) { if ($rawAccounts[$i][$ids['inetOrgPerson_title']] != "") {
if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_title']], 'title')) {
$partialAccounts[$i]['title'] = $rawAccounts[$i][$ids['inetOrgPerson_title']]; $partialAccounts[$i]['title'] = $rawAccounts[$i][$ids['inetOrgPerson_title']];
} }
else { else {
@ -536,8 +539,10 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i)); array_push($errMsg, array($i));
$triggered_messages[] = $errMsg; $triggered_messages[] = $errMsg;
} }
}
// employee type // employee type
if (($rawAccounts[$i][$ids['inetOrgPerson_type']] != "") && get_preg($rawAccounts[$i][$ids['inetOrgPerson_type']], 'employeeType')) { if ($rawAccounts[$i][$ids['inetOrgPerson_type']] != "") {
if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_type']], 'employeeType')) {
$partialAccounts[$i]['employeeType'] = $rawAccounts[$i][$ids['inetOrgPerson_type']]; $partialAccounts[$i]['employeeType'] = $rawAccounts[$i][$ids['inetOrgPerson_type']];
} }
else { else {
@ -545,8 +550,10 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i)); array_push($errMsg, array($i));
$triggered_messages[] = $errMsg; $triggered_messages[] = $errMsg;
} }
}
// street // street
if (($rawAccounts[$i][$ids['inetOrgPerson_street']] != "") && get_preg($rawAccounts[$i][$ids['inetOrgPerson_street']], 'street')) { if ($rawAccounts[$i][$ids['inetOrgPerson_street']] != "") {
if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_street']], 'street')) {
$partialAccounts[$i]['street'] = $rawAccounts[$i][$ids['inetOrgPerson_street']]; $partialAccounts[$i]['street'] = $rawAccounts[$i][$ids['inetOrgPerson_street']];
} }
else { else {
@ -554,8 +561,10 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i)); array_push($errMsg, array($i));
$triggered_messages[] = $errMsg; $triggered_messages[] = $errMsg;
} }
}
// postal code // postal code
if (($rawAccounts[$i][$ids['inetOrgPerson_postalCode']] != "") && get_preg($rawAccounts[$i][$ids['inetOrgPerson_postalCode']], 'postalCode')) { if ($rawAccounts[$i][$ids['inetOrgPerson_postalCode']] != "") {
if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_postalCode']], 'postalCode')) {
$partialAccounts[$i]['postalCode'] = $rawAccounts[$i][$ids['inetOrgPerson_postalCode']]; $partialAccounts[$i]['postalCode'] = $rawAccounts[$i][$ids['inetOrgPerson_postalCode']];
} }
else { else {
@ -563,8 +572,10 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i)); array_push($errMsg, array($i));
$triggered_messages[] = $errMsg; $triggered_messages[] = $errMsg;
} }
}
// postal address // postal address
if (($rawAccounts[$i][$ids['inetOrgPerson_address']] != "") && get_preg($rawAccounts[$i][$ids['inetOrgPerson_address']], 'postalAddress')) { if ($rawAccounts[$i][$ids['inetOrgPerson_address']] != "") {
if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_address']], 'postalAddress')) {
$partialAccounts[$i]['postalAddress'] = $rawAccounts[$i][$ids['inetOrgPerson_address']]; $partialAccounts[$i]['postalAddress'] = $rawAccounts[$i][$ids['inetOrgPerson_address']];
} }
else { else {
@ -572,17 +583,21 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i)); array_push($errMsg, array($i));
$triggered_messages[] = $errMsg; $triggered_messages[] = $errMsg;
} }
}
// telephone // telephone
if (($rawAccounts[$i][$ids['inetOrgPerson_telephone']] != "") && get_preg($rawAccounts[$i][$ids['inetOrgPerson_telephone']], 'telephone')) { if ($rawAccounts[$i][$ids['inetOrgPerson_telephone']] != "") {
if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_telephone']], 'telephone')) {
$partialAccounts[$i]['telephoneNumber'] = $rawAccounts[$i][$ids['inetOrgPerson_telephone']]; $partialAccounts[$i]['telephoneNumber'] = $rawAccounts[$i][$ids['inetOrgPerson_telephone']];
} }
else { else {
$errMsg = $this->messages['telephone'][1]; $errMsg = $this->messages['telephoneNumber'][1];
array_push($errMsg, array($i)); array_push($errMsg, array($i));
$triggered_messages[] = $errMsg; $triggered_messages[] = $errMsg;
} }
}
// mobile // mobile
if (($rawAccounts[$i][$ids['inetOrgPerson_mobile']] != "") && get_preg($rawAccounts[$i][$ids['inetOrgPerson_mobile']], 'telephone')) { if ($rawAccounts[$i][$ids['inetOrgPerson_mobile']] != "") {
if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_mobile']], 'telephone')) {
$partialAccounts[$i]['mobiletelephoneNumber'] = $rawAccounts[$i][$ids['inetOrgPerson_mobile']]; $partialAccounts[$i]['mobiletelephoneNumber'] = $rawAccounts[$i][$ids['inetOrgPerson_mobile']];
} }
else { else {
@ -590,8 +605,10 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i)); array_push($errMsg, array($i));
$triggered_messages[] = $errMsg; $triggered_messages[] = $errMsg;
} }
}
// facsimile // facsimile
if (($rawAccounts[$i][$ids['inetOrgPerson_fax']] != "") && get_preg($rawAccounts[$i][$ids['inetOrgPerson_fax']], 'telephone')) { if ($rawAccounts[$i][$ids['inetOrgPerson_fax']] != "") {
if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_fax']], 'telephone')) {
$partialAccounts[$i]['facsimileTelephoneNumber'] = $rawAccounts[$i][$ids['inetOrgPerson_fax']]; $partialAccounts[$i]['facsimileTelephoneNumber'] = $rawAccounts[$i][$ids['inetOrgPerson_fax']];
} }
else { else {
@ -599,8 +616,10 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i)); array_push($errMsg, array($i));
$triggered_messages[] = $errMsg; $triggered_messages[] = $errMsg;
} }
}
// eMail // eMail
if (($rawAccounts[$i][$ids['inetOrgPerson_email']] != "") && get_preg($rawAccounts[$i][$ids['inetOrgPerson_email']], 'email')) { if ($rawAccounts[$i][$ids['inetOrgPerson_email']] != "") {
if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_email']], 'email')) {
$partialAccounts[$i]['mail'] = $rawAccounts[$i][$ids['inetOrgPerson_email']]; $partialAccounts[$i]['mail'] = $rawAccounts[$i][$ids['inetOrgPerson_email']];
} }
else { else {
@ -608,6 +627,7 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i)); array_push($errMsg, array($i));
$triggered_messages[] = $errMsg; $triggered_messages[] = $errMsg;
} }
}
// cn // cn
if ($rawAccounts[$i][$ids['inetOrgPerson_cn']] != "") { if ($rawAccounts[$i][$ids['inetOrgPerson_cn']] != "") {
if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_cn']], 'cn')) { if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_cn']], 'cn')) {