Code

Speeding up profile display
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 16 Jan 2006 13:15:09 +0000 (13:15 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 16 Jan 2006 13:15:09 +0000 (13:15 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2487 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiProfile.inc

index 2150c692b0cc3b6829148b37fb3dbb83d854553a..5cb6600f99930499eb6e251d02bd4d4b5133b79e 100644 (file)
@@ -51,10 +51,17 @@ class faiProfile extends plugin
     }
 
     $categories = array("FAIscript","FAItemplate","FAIhook","FAIvariable","FAIpartitionTAble","FAIpackage");
+
+    /* Build filter */
+    $filter= "";
+    foreach ($categories as $cat){
+      $filter.= "(objectClass=$cat)";
+    }
+    
     $sort = array();
     $base = $_SESSION['faifilter']['base'];
     $ldap->cd($base);
-    $ldap->search("(objectClass=*)",array("*"));
+    $ldap->search("(|$filter)",array("*"));
     while($attrs = $ldap->fetch()){
       foreach($categories as $cat){
         if(in_array($cat,$attrs['objectClass'])){