summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 960b8d1)
raw | patch | inline | side by side (parent: 960b8d1)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 19 Apr 2010 13:12:24 +0000 (13:12 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 19 Apr 2010 13:12:24 +0000 (13:12 +0000) |
-
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17692 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17692 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/groups/class_group.inc | patch | blob | history |
diff --git a/gosa-core/plugins/admin/groups/class_group.inc b/gosa-core/plugins/admin/groups/class_group.inc
index c50f206bf48283342f84a624608b665dcd820a09..80e4494849b93a82c4b1f18e45c73aac15ecfe87 100644 (file)
$this->oldgroupType= $this->groupType;
}
- /* Get global filter config */
- if (!session::is_set("gufilter")){
- $ui= get_userinfo();
- $base= get_base_from_people($ui->dn);
- $gufilter= array( "dselect" => $base,
- "regex" => "*");
- session::set("gufilter", $gufilter);
- }
- $gufilter= session::get('gufilter');
- $gufilter['SubSearchGroup'] = false;
- session::set('gufilter',$gufilter);
-
if ($this->dn == "new"){
if(session::is_set('CurrentMainBase')){
$this->base = session::get('CurrentMainBase');
}
$this->orig_base = $this->base;
- /* Get global filter config */
- if (!session::is_set("sysfilter")){
- $ui= get_userinfo();
- $base= get_base_from_people($ui->dn);
- $sysfilter= array( "depselect" => $base,
- "regex" => "*");
- session::set("sysfilter", $sysfilter);
- }
-
/* This is always an account */
$this->is_account= TRUE;
/* Reload data */
function reload($silent = FALSE)
{
- /* Fix regex string */
- $gufilter = session::get("gufilter");
- $regex = normalizeLdap($gufilter['regex']);
- $MaxUser = $this->OnlyShowFirstEntries;
-
/* Prepare ldap link */
$ldap= $this->config->get_ldap_link();
- $ldap->cd($gufilter['dselect']);
+ $ldap->cd($this->config->current['BASE']);
/* Resolve still unresolved memberuids to fill the list with sn/giveName attributes
$this->members[$value] = $value;
}
}
-
- /* Create display list of users matching regex & filter
- */
- $this->displayUsers = array();
- $filter = "(&(objectClass=gosaAccount)(!(objectClass=gosaUserTemplate))(!(uid=*$))(|(uid=".$regex.")(sn=".$regex.")(givenName=".$regex.")))";
-
- /* Search in current tree or within subtrees depending on the checkbox from filter section */
- if($gufilter['SubSearchGroup']){
- $flag = GL_SIZELIMIT | GL_SUBSEARCH;
- $base = $gufilter['dselect'];
- }else{
- $flag = GL_SIZELIMIT ;
- $base = get_people_ou().$gufilter['dselect'];
- }
- $i = 0;
-
- $res = get_list($filter,"users",$base,array("dn", "uid", "sn", "givenName"),$flag);
-
- /* Fetch all users and skip already used users */
- foreach($res as $attrs){
- if(in_array($attrs['uid'][0], $this->memberUid)) {
- continue;
- }
- $i ++;
- if($i > $MaxUser) {
- break;
- }
- $this->dnMapping[$attrs['uid'][0]]= $attrs["dn"];
- $this->allusers[$attrs['uid'][0]] = $this->createResultName($attrs);
- $this->displayUsers[$attrs['uid'][0]] = $this->createResultName($attrs);
- }
-
- /* If more than max users are found, display a message to warn the user */
- if($i == $MaxUser && !$silent){
- msg_dialog::display(_("Configuration error"), sprintf(_("Search returned too many results. Not displaying more than %s entries!"), $MaxUser), ERROR_DIALOG);
- }
-
/* Sort lists */
natcasesort($this->members);
reset($this->members);
- natcasesort ($this->displayUsers);
- reset ($this->displayUsers);
}