fixed group refreshing (1719168)

This commit is contained in:
Roland Gruber 2007-06-01 17:25:07 +00:00
parent 9486448e06
commit 9e0c6bc13d
1 changed files with 37 additions and 13 deletions

View File

@ -137,8 +137,33 @@ class lamUserList extends lamList {
if (isset($_POST['apply_trans_primary'])) {
$this->trans_primary = $_POST['trans_primary'];
}
}
/**
* Sets some internal parameters.
*/
function listGetParams() {
parent::listGetParams();
// generate hash table for group translation
if ($this->trans_primary == "on" && ($this->refresh || (sizeof($this->trans_primary_hash) == 0))) {
if ($this->trans_primary == "on" && !$this->refresh && (sizeof($this->trans_primary_hash) == 0)) {
$this->refreshPrimaryGroupTranslation();
}
}
/**
* Rereads the entries from LDAP.
*/
function listRefreshData() {
parent::listRefreshData();
if ($this->trans_primary == "on") {
$this->refreshPrimaryGroupTranslation();
}
}
/**
* Refreshes the GID to group name cache.
*/
function refreshPrimaryGroupTranslation() {
$this->trans_primary_hash = array();
$grp_suffix = $_SESSION['config']->get_Suffix('group');
$filter = "objectClass=posixGroup";
@ -152,7 +177,6 @@ class lamUserList extends lamList {
}
}
}
}
/**
* Prints the content of a cell in the account list for a given LDAP entry and attribute.