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,13 +507,15 @@ 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']] != "") {
$partialAccounts[$i]['givenName'] = $rawAccounts[$i][$ids['inetOrgPerson_firstName']]; if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_firstName']], 'realname')) {
} $partialAccounts[$i]['givenName'] = $rawAccounts[$i][$ids['inetOrgPerson_firstName']];
else { }
$errMsg = $this->messages['givenName'][1]; else {
array_push($errMsg, array($i)); $errMsg = $this->messages['givenName'][1];
$triggered_messages[] = $errMsg; array_push($errMsg, array($i));
$triggered_messages[] = $errMsg;
}
} }
// description // description
if ($rawAccounts[$i][$ids['inetOrgPerson_description']] != "") { if ($rawAccounts[$i][$ids['inetOrgPerson_description']] != "") {
@ -528,85 +530,103 @@ 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']] != "") {
$partialAccounts[$i]['title'] = $rawAccounts[$i][$ids['inetOrgPerson_title']]; if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_title']], 'title')) {
} $partialAccounts[$i]['title'] = $rawAccounts[$i][$ids['inetOrgPerson_title']];
else { }
$errMsg = $this->messages['title'][1]; else {
array_push($errMsg, array($i)); $errMsg = $this->messages['title'][1];
$triggered_messages[] = $errMsg; array_push($errMsg, array($i));
$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']] != "") {
$partialAccounts[$i]['employeeType'] = $rawAccounts[$i][$ids['inetOrgPerson_type']]; if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_type']], 'employeeType')) {
} $partialAccounts[$i]['employeeType'] = $rawAccounts[$i][$ids['inetOrgPerson_type']];
else { }
$errMsg = $this->messages['employeeType'][1]; else {
array_push($errMsg, array($i)); $errMsg = $this->messages['employeeType'][1];
$triggered_messages[] = $errMsg; array_push($errMsg, array($i));
$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']] != "") {
$partialAccounts[$i]['street'] = $rawAccounts[$i][$ids['inetOrgPerson_street']]; if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_street']], 'street')) {
} $partialAccounts[$i]['street'] = $rawAccounts[$i][$ids['inetOrgPerson_street']];
else { }
$errMsg = $this->messages['street'][1]; else {
array_push($errMsg, array($i)); $errMsg = $this->messages['street'][1];
$triggered_messages[] = $errMsg; array_push($errMsg, array($i));
$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']] != "") {
$partialAccounts[$i]['postalCode'] = $rawAccounts[$i][$ids['inetOrgPerson_postalCode']]; if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_postalCode']], 'postalCode')) {
} $partialAccounts[$i]['postalCode'] = $rawAccounts[$i][$ids['inetOrgPerson_postalCode']];
else { }
$errMsg = $this->messages['postalCode'][1]; else {
array_push($errMsg, array($i)); $errMsg = $this->messages['postalCode'][1];
$triggered_messages[] = $errMsg; array_push($errMsg, array($i));
$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']] != "") {
$partialAccounts[$i]['postalAddress'] = $rawAccounts[$i][$ids['inetOrgPerson_address']]; if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_address']], 'postalAddress')) {
} $partialAccounts[$i]['postalAddress'] = $rawAccounts[$i][$ids['inetOrgPerson_address']];
else { }
$errMsg = $this->messages['postalAddress'][1]; else {
array_push($errMsg, array($i)); $errMsg = $this->messages['postalAddress'][1];
$triggered_messages[] = $errMsg; array_push($errMsg, array($i));
$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']] != "") {
$partialAccounts[$i]['telephoneNumber'] = $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]; else {
array_push($errMsg, array($i)); $errMsg = $this->messages['telephoneNumber'][1];
$triggered_messages[] = $errMsg; array_push($errMsg, array($i));
$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']] != "") {
$partialAccounts[$i]['mobiletelephoneNumber'] = $rawAccounts[$i][$ids['inetOrgPerson_mobile']]; if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_mobile']], 'telephone')) {
} $partialAccounts[$i]['mobiletelephoneNumber'] = $rawAccounts[$i][$ids['inetOrgPerson_mobile']];
else { }
$errMsg = $this->messages['mobileTelephone'][1]; else {
array_push($errMsg, array($i)); $errMsg = $this->messages['mobileTelephone'][1];
$triggered_messages[] = $errMsg; array_push($errMsg, array($i));
$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']] != "") {
$partialAccounts[$i]['facsimileTelephoneNumber'] = $rawAccounts[$i][$ids['inetOrgPerson_fax']]; if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_fax']], 'telephone')) {
} $partialAccounts[$i]['facsimileTelephoneNumber'] = $rawAccounts[$i][$ids['inetOrgPerson_fax']];
else { }
$errMsg = $this->messages['facsimileNumber'][1]; else {
array_push($errMsg, array($i)); $errMsg = $this->messages['facsimileNumber'][1];
$triggered_messages[] = $errMsg; array_push($errMsg, array($i));
$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']] != "") {
$partialAccounts[$i]['mail'] = $rawAccounts[$i][$ids['inetOrgPerson_email']]; if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_email']], 'email')) {
} $partialAccounts[$i]['mail'] = $rawAccounts[$i][$ids['inetOrgPerson_email']];
else { }
$errMsg = $this->messages['email'][1]; else {
array_push($errMsg, array($i)); $errMsg = $this->messages['email'][1];
$triggered_messages[] = $errMsg; array_push($errMsg, array($i));
$triggered_messages[] = $errMsg;
}
} }
// cn // cn
if ($rawAccounts[$i][$ids['inetOrgPerson_cn']] != "") { if ($rawAccounts[$i][$ids['inetOrgPerson_cn']] != "") {