use extended upload function
This commit is contained in:
parent
224c4ede8d
commit
435604544b
|
@ -286,14 +286,7 @@ class account extends baseModule {
|
|||
}
|
||||
if (!in_array('posixAccount', $selectedModules)) {
|
||||
// user name
|
||||
if (get_preg($rawAccounts[$i][$ids['account_uid']], 'username')) {
|
||||
$partialAccounts[$i]['uid'] = $rawAccounts[$i][$ids['account_uid']];
|
||||
}
|
||||
else {
|
||||
$errMsg = $this->messages['uid'][1];
|
||||
array_push($errMsg, array($i));
|
||||
$messages[] = $errMsg;
|
||||
}
|
||||
$this->mapSimpleUploadField($rawAccounts, $ids, $partialAccounts, $i, 'account_uid', 'uid', 'username', $this->messages['uid'][1], $messages);
|
||||
}
|
||||
}
|
||||
return $messages;
|
||||
|
|
|
@ -860,7 +860,7 @@ class asteriskExtension extends baseModule {
|
|||
if (!in_array("groupOfNames", $partialAccounts[$i]['objectClass']))
|
||||
$partialAccounts[$i]['objectClass'][] = "groupOfNames";
|
||||
// attributes
|
||||
$partialAccounts[$i]['AstExtension'] = $rawAccounts[$i][$ids['asteriskExtension_AstExtension']];
|
||||
$this->mapSimpleUploadField($rawAccounts, $ids, $partialAccounts, $i, 'asteriskExtension_AstExtension', 'AstExtension');
|
||||
|
||||
$extensionName = $partialAccounts[$i]['AstExtension'];
|
||||
$astPriorityTmp = 0;
|
||||
|
|
|
@ -421,7 +421,7 @@ class asteriskVoicemail extends baseModule implements passwordService {
|
|||
$this->mapSimpleUploadField($rawAccounts, $ids, $partialAccounts, $i, 'asteriskVoicemail_AstVoicemailContext', 'AstVoicemailContext',
|
||||
'realname', $this->messages['AstVoicemailContext'][1], $messages);
|
||||
|
||||
$partialAccounts[$i]['AstVoicemailPassword'] = $rawAccounts[$i][$ids['asteriskVoicemail_AstVoicemailPassword']];
|
||||
$this->mapSimpleUploadField($rawAccounts, $ids, $partialAccounts, $i, 'asteriskVoicemail_AstVoicemailPassword', 'AstVoicemailPassword');
|
||||
}
|
||||
return $messages;
|
||||
}
|
||||
|
|
|
@ -215,19 +215,7 @@ class authorizedServiceObject extends baseModule {
|
|||
// add object class
|
||||
if (!in_array("authorizedServiceObject", $partialAccounts[$i]['objectClass'])) $partialAccounts[$i]['objectClass'][] = "authorizedServiceObject";
|
||||
// add ASs
|
||||
if ($rawAccounts[$i][$ids['authorizedService']] != "") {
|
||||
$services = explode(', ', $rawAccounts[$i][$ids['authorizedService']]);
|
||||
for ($m = 0; $m < sizeof($services); $m++) {
|
||||
if (get_preg($services[$m], 'ascii')) {
|
||||
$partialAccounts[$i]['authorizedService'][] = $services[$m];
|
||||
}
|
||||
else {
|
||||
$errMsg = $this->messages['authorizedService'][1];
|
||||
array_push($errMsg, array($i));
|
||||
$messages[] = $errMsg;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->mapSimpleUploadField($rawAccounts, $ids, $partialAccounts, $i, 'authorizedService', 'authorizedService', 'ascii', $this->messages['authorizedService'][1], $messages, '/,[ ]*/');
|
||||
}
|
||||
return $messages;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue