summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 255c664)
raw | patch | inline | side by side (parent: 255c664)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 6 Mar 2008 10:52:30 +0000 (10:52 +0000) | ||
committer | hickert <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
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@9382 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_config.inc | patch | blob | history | |
include/class_ldap.inc | patch | blob | history |
index 7b55d77337bbeaf03a17f25be40dd6ffb37f0435..4e8dde67fba381e1d31d6a0922f719efccfc93e3 100644 (file)
--- a/include/class_config.inc
+++ b/include/class_config.inc
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']);
} else {
$this->ldap->referrals= $this->current['REFERRAL'];
}
- }
+# }
return ($this->ldap);
}
diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index e1c38548b9cc607f827633671f2ce43f5c919352..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($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);
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=*)";