improved error output for file upload
This commit is contained in:
parent
30766c172a
commit
81f7e5e847
|
@ -82,7 +82,9 @@ class posixGroup extends baseModule {
|
|||
$partialAccounts[$i]['memberUid'] = explode(",", $rawAccounts[$i][$ids['posixGroup_members']]);
|
||||
}
|
||||
else {
|
||||
$errors[] = $this->messages['memberUID'][0];
|
||||
$errMsg = $this->messages['memberUID'][0];
|
||||
array_push($errMsg, $i);
|
||||
$errors[] =$errMsg;
|
||||
}
|
||||
}
|
||||
// password
|
||||
|
@ -409,7 +411,7 @@ class posixGroup extends baseModule {
|
|||
$this->messages['cn'][0] = array('WARN', _('Groupname'), _('You are using a capital letters. This can cause problems because windows isn\'t case-sensitive.'));
|
||||
$this->messages['cn'][1] = array('WARN', _('Groupname'), _('Groupname in use. Selected next free groupname.'));
|
||||
$this->messages['cn'][2] = array('ERROR', _('Groupname'), _('Groupname contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and .-_ !'));
|
||||
$this->messages['memberUID'][0] = array('ERROR', 'PosixGroup_members', _("This value must be a list of user names separated by semicolons."));
|
||||
$this->messages['memberUID'][0] = array('ERROR', 'Account %s: posixGroup_members', _("This value must be a list of user names separated by semicolons."));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -79,7 +79,10 @@ class sambaGroupMapping extends baseModule {
|
|||
// SID
|
||||
$domSID = $nameToSID[$rawAccounts[$i][$ids['sambaGroupMapping_domain']]];
|
||||
if (!isset($domSID)) {
|
||||
$errors[] =array("ERROR", "", ""); // TODO
|
||||
$errMsg = $this->messages['sambaSID'][1];
|
||||
array_push($errMsg, $rawAccounts[$i][$ids['sambaGroupMapping_domain']]);
|
||||
array_push($errMsg, $i);
|
||||
$errors[] = $errMsg;
|
||||
}
|
||||
else {
|
||||
// RID
|
||||
|
@ -102,6 +105,7 @@ class sambaGroupMapping extends baseModule {
|
|||
$partialAccounts[$i]['displayName'] = $rawAccounts[$i][$ids['sambaGroupMapping_name']];
|
||||
}
|
||||
}
|
||||
return $errors;
|
||||
}
|
||||
|
||||
function delete_attributes($post) {
|
||||
|
@ -284,6 +288,7 @@ class sambaGroupMapping extends baseModule {
|
|||
**/
|
||||
function load_Messages() {
|
||||
$this->messages['sambaSID'][0] = array('ERROR', _('Special Group'),sprintf( _('There can be only one group %s.'), $rids[$i]), 'sambaSID');
|
||||
$this->messages['sambaSID'][1] = array('ERROR', _("Account %s (sambaGroupMapping_domain): LAM was unable to find a Samba 3 domain with this name!")); // third parameter must be set dynamically
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue