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;
}
// 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']];
}
else {
@ -515,6 +516,7 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i));
$triggered_messages[] = $errMsg;
}
}
// description
if ($rawAccounts[$i][$ids['inetOrgPerson_description']] != "") {
$partialAccounts[$i]['description'] = $rawAccounts[$i][$ids['inetOrgPerson_description']];
@ -528,7 +530,8 @@ class inetOrgPerson extends baseModule {
}
}
// 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']];
}
else {
@ -536,8 +539,10 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i));
$triggered_messages[] = $errMsg;
}
}
// 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']];
}
else {
@ -545,8 +550,10 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i));
$triggered_messages[] = $errMsg;
}
}
// 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']];
}
else {
@ -554,8 +561,10 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i));
$triggered_messages[] = $errMsg;
}
}
// 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']];
}
else {
@ -563,8 +572,10 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i));
$triggered_messages[] = $errMsg;
}
}
// 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']];
}
else {
@ -572,17 +583,21 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i));
$triggered_messages[] = $errMsg;
}
}
// 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']];
}
else {
$errMsg = $this->messages['telephone'][1];
$errMsg = $this->messages['telephoneNumber'][1];
array_push($errMsg, array($i));
$triggered_messages[] = $errMsg;
}
}
// 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']];
}
else {
@ -590,8 +605,10 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i));
$triggered_messages[] = $errMsg;
}
}
// 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']];
}
else {
@ -599,8 +616,10 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i));
$triggered_messages[] = $errMsg;
}
}
// 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']];
}
else {
@ -608,6 +627,7 @@ class inetOrgPerson extends baseModule {
array_push($errMsg, array($i));
$triggered_messages[] = $errMsg;
}
}
// cn
if ($rawAccounts[$i][$ids['inetOrgPerson_cn']] != "") {
if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_cn']], 'cn')) {