From 62044c19418364aa20fe2c8358fee144a5bcf9f0 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 6 Mar 2008 10:52:30 +0000 Subject: [PATCH] Reverted single bind changes. - git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@9382 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_config.inc | 9 ++++++--- include/class_ldap.inc | 27 --------------------------- 2 files changed, 6 insertions(+), 30 deletions(-) diff --git a/include/class_config.inc b/include/class_config.inc index 7b55d7733..4e8dde67f 100644 --- a/include/class_config.inc +++ b/include/class_config.inc @@ -181,8 +181,11 @@ class config { function get_ldap_link($sizelimit= FALSE) { - if($this->ldap === NULL || !is_resource($this->ldap->cid)){ - +# Use some hanlde for each search. +# Disabled due to unpredictable results +# +# if($this->ldap === NULL || !is_resource($this->ldap->cid)){ +# /* Build new connection */ $this->ldap= ldap_init ($this->current['SERVER'], $this->current['BASE'], $this->current['ADMIN'], $this->current['PASSWORD']); @@ -213,7 +216,7 @@ class config { } else { $this->ldap->referrals= $this->current['REFERRAL']; } - } +# } return ($this->ldap); } diff --git a/include/class_ldap.inc b/include/class_ldap.inc index e1c38548b..b5a5026b0 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -189,30 +189,11 @@ class LDAP{ return(ereg_replace("[^,]*[,]*[ ]*(.*)", "\\1", $basedn)); } - - /* Checks if there is still unfetched data - */ - function checkResult() - { - /* Check if we have started a search before */ - if($this->start != 0 && $this->re){ - - /* 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 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); @@ -242,10 +223,6 @@ class LDAP{ 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; @@ -281,10 +258,6 @@ class LDAP{ 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=*)"; -- 2.30.2