Code

Optimize LDAP search further by only checking for a non-zero object
authorwolffc <wolffc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 16 Sep 2010 14:41:37 +0000 (14:41 +0000)
committerwolffc <wolffc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 16 Sep 2010 14:41:37 +0000 (14:41 +0000)
count. This removes the need to size-limit the search to 1, which
clashes with the new 'sizelimitWarning' option.

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@19724 594d385d-05f5-0310-b6e9-bd551577e9d8

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;
       }