[Svn] r5489 - trunk/roundcubemail/program/include

trac at roundcube.net trac at roundcube.net
Fri Nov 25 14:43:41 CET 2011


Author: alec
Date: 2011-11-25 07:43:40 -0600 (Fri, 25 Nov 2011)
New Revision: 5489

Modified:
   trunk/roundcubemail/program/include/rcube_ldap.php
Log:
- Add some debug and error handling around vlv_search


Modified: trunk/roundcubemail/program/include/rcube_ldap.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_ldap.php	2011-11-25 10:29:48 UTC (rev 5488)
+++ trunk/roundcubemail/program/include/rcube_ldap.php	2011-11-25 13:43:40 UTC (rev 5489)
@@ -537,11 +537,11 @@
     }
 
     /**
-    * Get all members of the given group
-    *
-    * @param string Group DN
-    * @param array  Group entries (if called recursively)
-    * @return array Accumulated group members
+     * Get all members of the given group
+     *
+     * @param string Group DN
+     * @param array  Group entries (if called recursively)
+     * @return array Accumulated group members
      */
     function list_group_members($dn, $count = false, $entries = null)
     {
@@ -742,9 +742,17 @@
             $this->ldap_result = @$function($this->conn, $this->base_dn, $this->filter ? $this->filter : '(objectclass=*)',
                 array_values($this->fieldmap), 0, (int)$this->prop['sizelimit'], (int)$this->prop['timelimit']);
 
+            $this->result = new rcube_result_set(0);
+
+	    if (!$this->ldap_result) {
+                $this->_debug("S: ".ldap_error($this->conn));
+		return $this->result;
+	    }
+
+    	    $this->_debug("S: ".ldap_count_entries($this->conn, $this->ldap_result)." record(s)");
+
             // get all entries of this page and post-filter those that really match the query
             $search = mb_strtolower($value);
-            $this->result = new rcube_result_set(0);
             $entries = ldap_get_entries($this->conn, $this->ldap_result);
 
             for ($i = 0; $i < $entries['count']; $i++) {

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list