reduced upload code
This commit is contained in:
parent
55ef9496db
commit
3a6c38996a
|
@ -437,14 +437,8 @@ class nisMailAlias extends baseModule {
|
|||
if (!in_array("nisMailAlias", $partialAccounts[$i]['objectClass'])) $partialAccounts[$i]['objectClass'][] = "nisMailAlias";
|
||||
// add alias name
|
||||
// check format
|
||||
if (get_preg($rawAccounts[$i][$ids['nisMailAlias_alias']], 'nis_alias')) {
|
||||
$partialAccounts[$i]['cn'] = $rawAccounts[$i][$ids['nisMailAlias_alias']];
|
||||
}
|
||||
else {
|
||||
$errMsg = $this->messages['alias'][1];
|
||||
array_push($errMsg, array($i));
|
||||
$messages[] = $errMsg;
|
||||
}
|
||||
$this->mapSimpleUploadField($rawAccounts, $ids, $partialAccounts, $i, 'nisMailAlias_alias', 'cn',
|
||||
'nis_alias', $this->messages['alias'][1], $messages);
|
||||
// add recipients
|
||||
if ($rawAccounts[$i][$ids['nisMailAlias_recipients']] != "") {
|
||||
$aliases = explode(',', $rawAccounts[$i][$ids['nisMailAlias_recipients']]);
|
||||
|
|
|
@ -526,9 +526,7 @@ class nisnetgroup extends baseModule {
|
|||
// add cn
|
||||
$partialAccounts[$i]['cn'] = $rawAccounts[$i][$ids['nisnetgroup_cn']];
|
||||
// description (UTF-8, no regex check needed)
|
||||
if ($rawAccounts[$i][$ids['nisnetgroup_description']] != "") {
|
||||
$partialAccounts[$i]['description'] = $rawAccounts[$i][$ids['nisnetgroup_description']];
|
||||
}
|
||||
$this->mapSimpleUploadField($rawAccounts, $ids, $partialAccounts, $i, 'nisnetgroup_description', 'description');
|
||||
// additional groups
|
||||
if ($rawAccounts[$i][$ids['nisnetgroup_subgroups']] != "") {
|
||||
$groups = explode(",", $rawAccounts[$i][$ids['nisnetgroup_subgroups']]);
|
||||
|
|
Loading…
Reference in New Issue