From 251a763b46ffb6453bf84ac9765a56b74c41b1df Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 17 Mar 2008 11:34:33 +0000 Subject: [PATCH] Added re array git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9896 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_ldap.inc | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/gosa-core/include/class_ldap.inc b/gosa-core/include/class_ldap.inc index 560f809cf..bfb8e955e 100644 --- a/gosa-core/include/class_ldap.inc +++ b/gosa-core/include/class_ldap.inc @@ -36,6 +36,7 @@ class LDAP{ var $cid; var $hasres = array(); var $sr = array(); + var $re = array(); var $basedn =""; var $start = array(); // 0 if we are fetching the first entry, otherwise 1 var $error = ""; // Any error messages to be returned can be put here @@ -48,8 +49,6 @@ class LDAP{ var $referrals= array(); var $max_ldap_query_time = 0; // 0, empty or negative values will disable this check - var $re = NULL; - function LDAP($binddn,$bindpw, $hostname, $follow_referral= FALSE, $tls= FALSE) { global $config; @@ -316,17 +315,17 @@ class LDAP{ { if ($this->sr[$srp]){ $this->start[$srp] = 1; - $this->re= @ldap_first_entry($this->cid, $this->sr[$srp]); + $this->re[$srp]= @ldap_first_entry($this->cid, $this->sr[$srp]); } else { return array(); } } else { - $this->re= @ldap_next_entry($this->cid, $this->re); + $this->re[$srp]= @ldap_next_entry($this->cid, $this->re[$srp]); } - if ($this->re) + if ($this->re[$srp]) { - $att= @ldap_get_attributes($this->cid, $this->re); - $att['dn']= trim(LDAP::convert(@ldap_get_dn($this->cid, $this->re))); + $att= @ldap_get_attributes($this->cid, $this->re[$srp]); + $att['dn']= trim(LDAP::convert(@ldap_get_dn($this->cid, $this->re[$srp]))); } $this->error = @ldap_error($this->cid); if (!isset($att)){ @@ -361,13 +360,13 @@ class LDAP{ if($this->hascon){ if($this->hasres[$srp]){ - if(!$this->re) + if(!$this->re[$srp]) { $this->error = "Perform a Fetch with no valid Result"; } else { - $rv = @ldap_get_dn($this->cid, $this->re); + $rv = @ldap_get_dn($this->cid, $this->re[$srp]); $this->error = @ldap_error($this->cid); return(trim(LDAP::convert($rv))); -- 2.30.2