Code

Used divlist instead of ldapserach
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 May 2006 10:35:46 +0000 (10:35 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 May 2006 10:35:46 +0000 (10:35 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3422 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/class_groupApplication.inc

index ede18a1668e4faf5c1ab7ea6a479c008e8c78f39..c3ef74b5ecea30a0d533a86707d5cec2a97c04eb 100644 (file)
@@ -605,22 +605,11 @@ class appgroup extends plugin
 
     $div->SetHeight(300);
 
-    /* NEW LIST MANAGMENT
-     * We also need to search for the departments
-     * So we are able to navigate like in konquerer
-     */
-
-    //FIXME: Why do we not use get_list here? It's the same code all over the time...
-    $ldap = $this->config->get_ldap_link();
-    $ldap->cd($this->curbase) ;
-    $ldap->ls("(objectClass=gosaDepartment)"); 
-    $departments= array();
-    $tmp = array();
-    while ($value = $ldap->fetch()){
-      $tmp[strtolower($value['dn']).$value['dn']]=$value;
-    }
-    ksort($tmp);
-    foreach($tmp as $value){
+    /* get departments */  
+    $ui = get_userinfo();
+    $departments = array();
+    $res = get_list("(objectClass=gosaDepartment)",$ui->subtreeACL,$this->curbase,array("description","cn","ou"),GL_SIZELIMIT);
+    foreach($res as $value){
       $fdn= @LDAP::fix($value['dn']);
       if($value["description"][0]!=".."){
         $departments[$value['dn']]= convert_department_dn($fdn)." - [".$value["description"][0]."]";
@@ -629,9 +618,6 @@ class appgroup extends plugin
       }
     }
 
-    /* END NEW LIST MANAGMENT
-     */
-
     $linkopen = "<a href='?plug=".$_GET['plug']."&amp;act=depopen&amp;depid=%s'>%s</a>";
     $linkadd  = "<a href='?plug=".$_GET['plug']."&amp;act=add&amp;id=%s'>%s</a>";