diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index 6ca1b49c58808a1e1ea00ba5516318969a396521..b5a5026b0db14e3e5014bc137be276b1c6d93795 100644 (file)
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
return(ereg_replace("[^,]*[,]*[ ]*(.*)", "\\1", $basedn));
}
-
- /* Checks if there is still unfetched data
- */
- function checkResult()
- {
- /* Check if we have started a search before */
- if(is_resource(@ldap_first_entry($this->cid, $this->sr))){
-
- /* Check if there are still unfetched elements */
- if(is_resource(@ldap_next_entry($this->cid, $this->re))){
- trigger_error("A new search was initiated while the an older search wasn't fetched completely.");
- }
- }
- }
-
function search($filter, $attrs= array())
{
if($this->hascon){
if ($this->reconnect) $this->connect();
- /* Check if there are still unfetched objects from last search
- */
- $this->checkResult();
-
$start = microtime();
$this->clearResult();
$this->sr = @ldap_search($this->cid, $this->fix($this->basedn), $filter, $attrs);
if($this->hascon){
if ($this->reconnect) $this->connect();
- /* Check if there are still unfetched objects from last search
- */
- $this->checkResult();
-
$this->clearResult();
if ($basedn == "")
$basedn = $this->basedn;
if($this->hascon){
if ($this->reconnect) $this->connect();
- /* Check if there are still unfetched objects from last search
- */
- $this->checkResult();
-
$start = microtime();
$this->clearResult();
$filter = "(objectclass=*)";