fixed loading of errormessages, moved config messages to errormessages
This commit is contained in:
parent
187f537a08
commit
9afa90dacc
|
@ -35,10 +35,8 @@ class posixGroup extends baseModule {
|
||||||
* Creates a new posixGroup object.
|
* Creates a new posixGroup object.
|
||||||
*/
|
*/
|
||||||
function posixGroup($scope) {
|
function posixGroup($scope) {
|
||||||
// error messages for input checks
|
// load error messages
|
||||||
$this->messages['minGID'] = array('ERROR', _('Minimum GID number'), _('Minimum GID number is invalid or empty!'));
|
$this->load_errorMessages();
|
||||||
$this->messages['maxGID'] = array('ERROR', _('Maximum GID number'), _('Maximum GID number is invalid or empty!'));
|
|
||||||
$this->messages['cmpGID'] = array('ERROR', _('Maximum GID number'), _('Maximum GID number must be greater than minimum GID number!'));
|
|
||||||
// call parent constructor
|
// call parent constructor
|
||||||
parent::baseModule($scope);
|
parent::baseModule($scope);
|
||||||
}
|
}
|
||||||
|
@ -254,12 +252,23 @@ class posixGroup extends baseModule {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
// configuration checks
|
// configuration checks
|
||||||
$return['config_checks']['group']['posixGroup_minGID'] = array('type' => 'regex', 'regex' => '^[0-9]+$',
|
$return['config_checks']['group']['posixGroup_minGID'] = array(
|
||||||
'required' => true, 'required_message' => $this->messages['minGID'], 'error_message' => $this->messages['minGID']);
|
'type' => 'regex',
|
||||||
$return['config_checks']['group']['posixGroup_maxGID'] = array('type' => 'regex', 'regex' => '^[0-9]+$',
|
'regex' => '^[0-9]+$',
|
||||||
'required' => true, 'required_message' => $this->messages['maxGID'], 'error_message' => $this->messages['maxGID']);
|
'required' => true,
|
||||||
$return['config_checks']['group']['cmpGID'] = array('type' => 'int_greater', 'cmp_name1' => 'posixGroup_maxGID',
|
'required_message' => $this->errormessages['gidNumber'][5],
|
||||||
'cmp_name2' => 'posixGroup_minGID', 'error_message' => $this->messages['cmpGID']);
|
'error_message' => $this->errormessages['gidNumber'][5]);
|
||||||
|
$return['config_checks']['group']['posixGroup_maxGID'] = array(
|
||||||
|
'type' => 'regex',
|
||||||
|
'regex' => '^[0-9]+$',
|
||||||
|
'required' => true,
|
||||||
|
'required_message' => $this->errormessages['gidNumber'][6],
|
||||||
|
'error_message' => $this->errormessages['gidNumber'][6]);
|
||||||
|
$return['config_checks']['group']['cmpGID'] = array(
|
||||||
|
'type' => 'int_greater',
|
||||||
|
'cmp_name1' => 'posixGroup_maxGID',
|
||||||
|
'cmp_name2' => 'posixGroup_minGID',
|
||||||
|
'error_message' => $this->errormessages['gidNumber'][7]);
|
||||||
// available PDF fields
|
// available PDF fields
|
||||||
$return['PDF_fields'] = array( 'cn',
|
$return['PDF_fields'] = array( 'cn',
|
||||||
'gidNumber',
|
'gidNumber',
|
||||||
|
@ -348,15 +357,15 @@ class posixGroup extends baseModule {
|
||||||
/** this functin fills the error message array with messages
|
/** this functin fills the error message array with messages
|
||||||
**/
|
**/
|
||||||
function load_errorMessages() {
|
function load_errorMessages() {
|
||||||
$this->errormessages['minGID'][0] = array('ERROR', _('Minimum GID number'), _('Minimum GID number is invalid or empty!'));
|
|
||||||
$this->errormessages['maxGID'][0] = array('ERROR', _('Maximum GID number'), _('Maximum GID number is invalid or empty!'));
|
|
||||||
$this->errormessages['cmpGID'][0] = array('ERROR', _('Maximum GID number'), _('Maximum GID number must be greater than minimum GID number!'));
|
|
||||||
$this->errormessages['userPassword'][0] = array('ERROR', _('Password'), _('Please enter the same password in both password-fields.'));
|
$this->errormessages['userPassword'][0] = array('ERROR', _('Password'), _('Please enter the same password in both password-fields.'));
|
||||||
$this->errormessages['userPassword'][1] = array('ERROR', _('Password'), _('Password contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and #*,.;:_-+!$%&/|?{[()]}= !'));
|
$this->errormessages['userPassword'][1] = array('ERROR', _('Password'), _('Password contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and #*,.;:_-+!$%&/|?{[()]}= !'));
|
||||||
$this->errormessages['gidNumber'][0] = array('INFO', _('GID number'), _('GID number has changed. Please select checkbox to change GID number of users and hosts.'));
|
$this->errormessages['gidNumber'][0] = array('INFO', _('GID number'), _('GID number has changed. Please select checkbox to change GID number of users and hosts.'));
|
||||||
$this->errormessages['gidNumber'][2] = array('WARN', _('ID-Number'), _('It is possible that this ID-number is reused. This can cause several problems because files with old permissions might still exist. To avoid this warning set maxUID to a higher value.'));
|
$this->errormessages['gidNumber'][2] = array('WARN', _('ID-Number'), _('It is possible that this ID-number is reused. This can cause several problems because files with old permissions might still exist. To avoid this warning set maxUID to a higher value.'));
|
||||||
$this->errormessages['gidNumber'][3] = array('ERROR', _('ID-Number'), _('No free ID-Number!'));
|
$this->errormessages['gidNumber'][3] = array('ERROR', _('ID-Number'), _('No free ID-Number!'));
|
||||||
$this->errormessages['gidNumber'][4] = array('ERROR', _('ID-Number'), _('ID is already in use'));
|
$this->errormessages['gidNumber'][4] = array('ERROR', _('ID-Number'), _('ID is already in use'));
|
||||||
|
$this->errormessages['gidNumber'][5] = array('ERROR', _('Minimum GID number'), _('Minimum GID number is invalid or empty!'));
|
||||||
|
$this->errormessages['gidNumber'][6] = array('ERROR', _('Maximum GID number'), _('Maximum GID number is invalid or empty!'));
|
||||||
|
$this->errormessages['gidNumber'][7] = array('ERROR', _('Maximum GID number'), _('Maximum GID number must be greater than minimum GID number!'));
|
||||||
$this->errormessages['cn'][0] = array('WARN', _('Groupname'), _('You are using a capital letters. This can cause problems because windows isn\'t case-sensitive.'));
|
$this->errormessages['cn'][0] = array('WARN', _('Groupname'), _('You are using a capital letters. This can cause problems because windows isn\'t case-sensitive.'));
|
||||||
$this->errormessages['cn'][1] = array('WARN', _('Groupname'), _('Groupname in use. Selected next free groupname.'));
|
$this->errormessages['cn'][1] = array('WARN', _('Groupname'), _('Groupname in use. Selected next free groupname.'));
|
||||||
$this->errormessages['cn'][2] = array('ERROR', _('Groupname'), _('Groupname contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and .-_ !'));
|
$this->errormessages['cn'][2] = array('ERROR', _('Groupname'), _('Groupname contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and .-_ !'));
|
||||||
|
|
Loading…
Reference in New Issue