code cleanup: added parent function for module_ready() and module_complete() which always return true to baseModule
This commit is contained in:
parent
568bb97cc1
commit
6aaae2094a
|
@ -521,6 +521,25 @@ class baseModule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to check if this module page can be displayed.
|
||||||
|
* It returns false if a module depends on data from other modules which was not yet entered.
|
||||||
|
*
|
||||||
|
* @return boolean true, if page can be displayed
|
||||||
|
*/
|
||||||
|
function module_ready() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This functions is used to check if all settings for this module have been made.
|
||||||
|
*
|
||||||
|
* @return boolean true, if settings are complete
|
||||||
|
*/
|
||||||
|
function module_complete() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the attribute values follow the LDAP syntax.
|
* Checks if the attribute values follow the LDAP syntax.
|
||||||
* Not every LDAP attribute allows UTF-8 strings. Therefore we do a syntax check here
|
* Not every LDAP attribute allows UTF-8 strings. Therefore we do a syntax check here
|
||||||
|
|
|
@ -105,13 +105,6 @@ class account extends baseModule {
|
||||||
function load_Messages() {
|
function load_Messages() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function returns true if all required attributes from other
|
|
||||||
* modules are set. This is required to prevent undefined states
|
|
||||||
*/
|
|
||||||
function module_ready() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This functions return true
|
/* This functions return true
|
||||||
* if all needed settings are done
|
* if all needed settings are done
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -297,13 +297,6 @@ class inetLocalMailRecipient extends baseModule {
|
||||||
return $this->inputCorrect;
|
return $this->inputCorrect;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if all settings on module page are correct.
|
|
||||||
*/
|
|
||||||
function module_ready() {
|
|
||||||
return $this->inputCorrect;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* In this function the LDAP account is built up.
|
* In this function the LDAP account is built up.
|
||||||
*
|
*
|
||||||
|
|
|
@ -344,28 +344,10 @@ class inetOrgPerson extends baseModule {
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Initializes the module in its accountContainer
|
|
||||||
*
|
|
||||||
* @param string $base the name of account_container in session
|
|
||||||
*/
|
|
||||||
function init($base) {
|
|
||||||
// call parent init
|
|
||||||
parent::init($base);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This function returns true if all required attributes from other
|
|
||||||
* modules are set. This is required to prevent undefined states
|
|
||||||
*/
|
|
||||||
function module_ready() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This functions return true
|
/* This functions return true
|
||||||
* if all needed settings are done
|
* if all needed settings are done
|
||||||
*/
|
*/
|
||||||
function module_complete() {
|
function module_complete() {
|
||||||
if (!$this->module_ready()) return false;
|
|
||||||
if ($this->attributes['sn'][0] == '') return false;
|
if ($this->attributes['sn'][0] == '') return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -617,13 +617,6 @@ class kolabUser extends baseModule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if all settings on module page are correct.
|
|
||||||
*/
|
|
||||||
function module_ready() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* In this function the LDAP account is built up.
|
* In this function the LDAP account is built up.
|
||||||
*
|
*
|
||||||
|
|
|
@ -247,13 +247,6 @@ class nisMailAlias extends baseModule {
|
||||||
return $this->inputCorrect;
|
return $this->inputCorrect;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if all settings on module page are correct.
|
|
||||||
*/
|
|
||||||
function module_ready() {
|
|
||||||
return $this->inputCorrect;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* In this function the LDAP account is built up.
|
* In this function the LDAP account is built up.
|
||||||
*
|
*
|
||||||
|
|
|
@ -431,15 +431,10 @@ class posixAccount extends baseModule {
|
||||||
var $groups_orig;
|
var $groups_orig;
|
||||||
var $createhomedir;
|
var $createhomedir;
|
||||||
|
|
||||||
function module_ready() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This functions return true
|
/* This functions return true
|
||||||
* if all needed settings are done
|
* if all needed settings are done
|
||||||
*/
|
*/
|
||||||
function module_complete() {
|
function module_complete() {
|
||||||
if (!$this->module_ready()) return false;
|
|
||||||
if ($this->attributes['uid'][0] == '') return false;
|
if ($this->attributes['uid'][0] == '') return false;
|
||||||
if ($this->attributes['uidNumber'][0] == '') return false;
|
if ($this->attributes['uidNumber'][0] == '') return false;
|
||||||
if ($this->attributes['gidNumber'][0] == '') return false;
|
if ($this->attributes['gidNumber'][0] == '') return false;
|
||||||
|
|
|
@ -504,18 +504,12 @@ class posixGroup extends baseModule {
|
||||||
* if all needed settings are done
|
* if all needed settings are done
|
||||||
*/
|
*/
|
||||||
function module_complete() {
|
function module_complete() {
|
||||||
if (!$this->module_ready()) return false;
|
|
||||||
if ($this->attributes['cn'][0] == '') return false;
|
if ($this->attributes['cn'][0] == '') return false;
|
||||||
if ($this->attributes['gidNumber'][0] == '') return false;
|
if ($this->attributes['gidNumber'][0] == '') return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function module_ready() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* This function returns a list of all html-pages in module
|
/* This function returns a list of all html-pages in module
|
||||||
* This is usefull for mass upload and pdf-files
|
* This is usefull for mass upload and pdf-files
|
||||||
* because lam can walk trough all pages itself and do some
|
* because lam can walk trough all pages itself and do some
|
||||||
|
|
|
@ -47,8 +47,9 @@ class shadowAccount extends baseModule {
|
||||||
parent::baseModule($scope);
|
parent::baseModule($scope);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** this functin fills the error message array with messages
|
/**
|
||||||
**/
|
* This function builds up the message array.
|
||||||
|
*/
|
||||||
function load_Messages() {
|
function load_Messages() {
|
||||||
// error messages for input checks
|
// error messages for input checks
|
||||||
$this->messages['shadowMin'][0] = array('ERROR', _('Password minage'), _('Password minimum age must be are natural number.'));
|
$this->messages['shadowMin'][0] = array('ERROR', _('Password minage'), _('Password minimum age must be are natural number.'));
|
||||||
|
@ -211,25 +212,6 @@ class shadowAccount extends baseModule {
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Constructor
|
|
||||||
function init($base) {
|
|
||||||
// call parent init
|
|
||||||
parent::init($base);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function module_ready() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This functions return true
|
|
||||||
* if all needed settings are done
|
|
||||||
*/
|
|
||||||
function module_complete() {
|
|
||||||
if (!$this->module_ready()) return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This function returns a list of all html-pages in module
|
/* This function returns a list of all html-pages in module
|
||||||
* This is usefull for mass upload and pdf-files
|
* This is usefull for mass upload and pdf-files
|
||||||
* because lam can walk trough all pages itself and do some
|
* because lam can walk trough all pages itself and do some
|
||||||
|
|
Loading…
Reference in New Issue