Code

Optimize LDAP search further by only checking for a non-zero object
[gosa.git] / trunk / gosa-core / plugins / admin / groups / class_divListGroup.inc
index c53613cc0a6be36f0346481300ef83dba6fcd65d..12088a8822458324129c09c32a9d9dd9c34fff77 100644 (file)
@@ -239,14 +239,9 @@ class divListGroup extends MultiSelectWindow
       /* Set ldap base to dn of this group */
       $ldap->cd ($val['dn']);
 
-      /* Set ldap size limit to 1, because we only need one entry */
-      $ldap->set_size_limit(1);
-
       /* Search for applications. */
       $ldap->search("(objectClass=gotoMenuEntry)",array("dn"));
-      $entry = $ldap->fetch();
-
-      if (isset($entry['dn'])) {
+      if ($ldap->count()) {
         $appl  = $applimg;
       }