Code

Updated baseSelect, use get_list instead of ldapsearch (strict_units)
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 28 Aug 2006 05:48:52 +0000 (05:48 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 28 Aug 2006 05:48:52 +0000 (05:48 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4521 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_baseSelectDialog.inc

index 6739c1848b042a10bc6555d86a9d28296841f45b..a2569d644fd067be9e79a2c22d874469839cb7e0 100644 (file)
@@ -60,22 +60,24 @@ class baseSelectDialog extends MultiSelectWindow
   function setEntries()
   {
     $this->ClearElementsList();
-    $ldap = $this->config->get_ldap_link();
-    $ldap->cd($this->selectedBase);
-    $ldap->ls("(&(objectClass=gosaDepartment)
-                 (|(ou=".$this->base_selection_regex.")
-                   (cn=".$this->base_selection_regex.")
-                   (description=".$this->base_selection_regex.")))",
-              $this->selectedBase,array("ou","description","cn"));
 
     $link = "<a href='?plug=".$_GET['plug']."&open_dep=%s'>%s</a>";
 
     $base_back          = preg_replace("/^[^,]+,/","",$this->selectedBase);
     $base_back          = convert_department_dn($base_back);
   
+
+    $filter = "(&(objectClass=gosaDepartment)".
+                "(|(ou=".$this->base_selection_regex.")".
+                  "(cn=".$this->base_selection_regex.")".
+                  "(description=".$this->base_selection_regex.")))";
+
+    $ui = get_userinfo();
+    $res = get_list($filter,$ui->subtreeACL,$this->selectedBase,array("ou","description","cn"),GL_SIZELIMIT);
+
     /* Add departments, to be able to switch into them
      */
-    while($attrs = $ldap->fetch()){
+    foreach($res as $attrs){
  
       $key = $attrs['dn']  ;
       $val = $attrs['ou'][0];