X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Fplugins%2Fadmin%2Fgroups%2Fclass_group.inc;h=ac7ebe894a93bd2c5cdd5056d139f546868753cb;hb=77208c980a6f8765532aa592fb3e467f731393cd;hp=c50f206bf48283342f84a624608b665dcd820a09;hpb=4c9b6cd5ae6c51c9eaacf4b938d3560188cb4c7c;p=gosa.git diff --git a/gosa-core/plugins/admin/groups/class_group.inc b/gosa-core/plugins/admin/groups/class_group.inc index c50f206bf..ac7ebe894 100644 --- a/gosa-core/plugins/admin/groups/class_group.inc +++ b/gosa-core/plugins/admin/groups/class_group.inc @@ -168,18 +168,6 @@ class group extends plugin $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'); @@ -194,15 +182,6 @@ class group extends plugin } $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; @@ -365,16 +344,8 @@ class group extends plugin $smarty->assign("baseSelect",false); } - /* Show main page */ - $smarty->assign("alphabet", generate_alphabet(10)); - $smarty->assign("search_image", get_template_path('images/lists/search.png')); - $smarty->assign("launchimage", get_template_path('images/lists/action.png')); - $smarty->assign("tree_image", get_template_path('images/lists/search-subtree.png')); - $smarty->assign("deplist", $this->config->idepartments); - /* Multiple edit handling */ $smarty->assign("multiple_support",$this->multiple_support_active); - $smarty->assign("memberUid_All",$this->memberUid); $smarty->assign("memberUid_Some",$this->memberUid_used_by_some); @@ -462,14 +433,9 @@ class group extends plugin /* 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 @@ -509,49 +475,10 @@ class group extends plugin $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); }