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";
|
if (!in_array("nisMailAlias", $partialAccounts[$i]['objectClass'])) $partialAccounts[$i]['objectClass'][] = "nisMailAlias";
|
||||||
// add alias name
|
// add alias name
|
||||||
// check format
|
// check format
|
||||||
if (get_preg($rawAccounts[$i][$ids['nisMailAlias_alias']], 'nis_alias')) {
|
$this->mapSimpleUploadField($rawAccounts, $ids, $partialAccounts, $i, 'nisMailAlias_alias', 'cn',
|
||||||
$partialAccounts[$i]['cn'] = $rawAccounts[$i][$ids['nisMailAlias_alias']];
|
'nis_alias', $this->messages['alias'][1], $messages);
|
||||||
}
|
|
||||||
else {
|
|
||||||
$errMsg = $this->messages['alias'][1];
|
|
||||||
array_push($errMsg, array($i));
|
|
||||||
$messages[] = $errMsg;
|
|
||||||
}
|
|
||||||
// add recipients
|
// add recipients
|
||||||
if ($rawAccounts[$i][$ids['nisMailAlias_recipients']] != "") {
|
if ($rawAccounts[$i][$ids['nisMailAlias_recipients']] != "") {
|
||||||
$aliases = explode(',', $rawAccounts[$i][$ids['nisMailAlias_recipients']]);
|
$aliases = explode(',', $rawAccounts[$i][$ids['nisMailAlias_recipients']]);
|
||||||
|
|
|
@ -526,9 +526,7 @@ class nisnetgroup extends baseModule {
|
||||||
// add cn
|
// add cn
|
||||||
$partialAccounts[$i]['cn'] = $rawAccounts[$i][$ids['nisnetgroup_cn']];
|
$partialAccounts[$i]['cn'] = $rawAccounts[$i][$ids['nisnetgroup_cn']];
|
||||||
// description (UTF-8, no regex check needed)
|
// description (UTF-8, no regex check needed)
|
||||||
if ($rawAccounts[$i][$ids['nisnetgroup_description']] != "") {
|
$this->mapSimpleUploadField($rawAccounts, $ids, $partialAccounts, $i, 'nisnetgroup_description', 'description');
|
||||||
$partialAccounts[$i]['description'] = $rawAccounts[$i][$ids['nisnetgroup_description']];
|
|
||||||
}
|
|
||||||
// additional groups
|
// additional groups
|
||||||
if ($rawAccounts[$i][$ids['nisnetgroup_subgroups']] != "") {
|
if ($rawAccounts[$i][$ids['nisnetgroup_subgroups']] != "") {
|
||||||
$groups = explode(",", $rawAccounts[$i][$ids['nisnetgroup_subgroups']]);
|
$groups = explode(",", $rawAccounts[$i][$ids['nisnetgroup_subgroups']]);
|
||||||
|
|
Loading…
Reference in New Issue