Code

Reverted single bind changes.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 6 Mar 2008 10:52:30 +0000 (10:52 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 6 Mar 2008 10:52:30 +0000 (10:52 +0000)
-

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

include/class_config.inc
include/class_ldap.inc

index 7b55d77337bbeaf03a17f25be40dd6ffb37f0435..4e8dde67fba381e1d31d6a0922f719efccfc93e3 100644 (file)
@@ -181,8 +181,11 @@ class config  {
 
   function get_ldap_link($sizelimit= FALSE)
   {
 
   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']);
       /* 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'];
       }
       } else {
         $this->ldap->referrals= $this->current['REFERRAL'];
       }
-    }
+#    } 
     return ($this->ldap);
   }
 
     return ($this->ldap);
   }
 
index e1c38548b9cc607f827633671f2ce43f5c919352..b5a5026b0db14e3e5014bc137be276b1c6d93795 100644 (file)
@@ -189,30 +189,11 @@ class LDAP{
     return(ereg_replace("[^,]*[,]*[ ]*(.*)", "\\1", $basedn));
   }
 
     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();
 
   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);
       $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();
 
     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;
       $this->clearResult();
       if ($basedn == "")
         $basedn = $this->basedn;
@@ -281,10 +258,6 @@ class LDAP{
     if($this->hascon){
       if ($this->reconnect) $this->connect();
 
     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=*)";
       $start = microtime();
       $this->clearResult();
       $filter = "(objectclass=*)";