replaced load_ldap_attributes with parent class function call

This commit is contained in:
Roland Gruber 2005-04-16 13:41:17 +00:00
parent f681a189c9
commit b29106b783
9 changed files with 11 additions and 34 deletions

View File

@ -100,10 +100,13 @@ class baseModule {
}
/* This function loads all standard ldap attributes. It is used
/**
* This function loads all standard LDAP attributes. It is used
* by the modules to reduce code
*
* @param array $attr attribute list
*/
function load_ldap_attributes($attr) {
function load_attributes($attr) {
// Load attributes which are displayed
$objectClassName = $this->attributes['objectClass'];
// unset count entries
@ -124,6 +127,7 @@ class baseModule {
if (in_array($objectClassName[0], $attr['objectClass']))
$this->orig['objectClass'] = $objectClassName;
else $this->orig['objectClass'] = array();
return 0;
}
/**

View File

@ -114,14 +114,6 @@ class account extends baseModule {
return array('attributes');
}
/* This function loads all attributes into the object
* $attr is an array as it's retured from ldap_get_attributes
*/
function load_attributes($attr) {
$this->load_ldap_attributes($attr);
return 0;
}
/* This function returns an array with 4 entries:
* array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr), 'lamdaemon' => array(cmds)), DN2 .... )
* DN is the DN to change. It may be possible to change several DNs,

View File

@ -314,16 +314,6 @@ class inetOrgPerson extends baseModule {
return array('attributes');
}
/* This function loads all attributes into the object
* $attr is an array as it's retured from ldap_get_attributes
*/
function load_attributes($attr) {
$this->load_ldap_attributes($attr);
return 0;
}
/* This function returns an array with 4 entries:
* array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr), 'lamdaemon' => array(cmds)), DN2 .... )
* DN is the DN to change. It may be possible to change several DNs,

View File

@ -431,7 +431,7 @@ class posixAccount extends baseModule {
* $attr is an array as it's retured from ldap_get_attributes
*/
function load_attributes($attr) {
$this->load_ldap_attributes($attr);
parent::load_attributes($attr);
// get all additional groupmemberships
$dn_groups = $_SESSION['cache']->get_cache('memberUid', 'posixGroup', 'group');

View File

@ -398,7 +398,7 @@ class posixGroup extends baseModule {
* $attr is an array as it's retured from ldap_get_attributes
*/
function load_attributes($attr) {
$this->load_ldap_attributes($attr);
parent::load_attributes($attr);
// Delete password. We don't want to show an encrypted password because it makes no sense
$this->userPassword('');
return 0;

View File

@ -471,7 +471,7 @@ class sambaAccount extends baseModule {
* $attr is an array as it's retured from ldap_get_attributes
*/
function load_attributes($attr) {
$this->load_ldap_attributes($attr);
parent::load_attributes($attr);
if (strpos($this->attributes['acctFlags'][0], "D")) $this->deactivated = true;
if (strpos($this->attributes['acctFlags'][0], "N")) $this->nopwd = true;
if (strpos($this->attributes['acctFlags'][0], "X")) $this->noexpire = true;

View File

@ -345,15 +345,6 @@ class sambaGroupMapping extends baseModule {
}
}
/* This function loads all attributes into the object
* $attr is an array as it's retured from ldap_get_attributes
*/
function load_attributes($attr) {
$this->load_ldap_attributes($attr);
return 0;
}
/** this functin fills the error message array with messages
**/
function load_Messages() {

View File

@ -421,7 +421,7 @@ class sambaSamAccount extends baseModule {
* $attr is an array as it's retured from ldap_get_attributes
*/
function load_attributes($attr) {
$this->load_ldap_attributes($attr);
parent::load_attributes($attr);
if (strpos($this->attributes['sambaAcctFlags'][0], "D")) $this->deactivated = true;
if (strpos($this->attributes['sambaAcctFlags'][0], "N")) $this->nopwd = true;
if (strpos($this->attributes['sambaAcctFlags'][0], "X")) $this->noexpire = true;

View File

@ -237,7 +237,7 @@ class shadowAccount extends baseModule {
*/
unset($this->attributes['userPassword']);
unset($this->orig['userPassword']);
$this->load_ldap_attributes($attr);
parent::load_attributes($attr);
return 0;
}