summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4fbc410)
raw | patch | inline | side by side (parent: 4fbc410)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Mar 2008 15:53:33 +0000 (15:53 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Mar 2008 15:53:33 +0000 (15:53 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9449 594d385d-05f5-0310-b6e9-bd551577e9d8
index bbe1c17948e94aad56f5d7975f9d5f96641765a1..963db36b3a45a2f95323c9076920585580c89ab0 100644 (file)
function get_ldap_link($sizelimit= FALSE)
{
+ if($this->ldap === NULL || !is_resource($this->ldap->cid)){
-# REuse last ldap valid handle again.
-# 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);
}
index 93686b6e63476d594db051f1edf22eb8e005d9ac..c01428d42f2047bd6a24f022599bd885ec7f9e59 100644 (file)
}
-# /* 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))){
-# new log("debug","LDAP:: CAT/SEARCH/FETCH","A new search was initiated while an older search wasn't fetched completely.");
-# msg_dialog::display(_("Debug"),"A new search was initiated while an older search wasn't fetched completely.",ERROR_DIALOG);
-# 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, LDAP::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();
-
$this->clearResult();
$filter = "(objectclass=*)";
$this->sr = @ldap_read($this->cid, LDAP::fix($dn), $filter,$attrs);
return ($result);
}
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
index eba6b42bf13fb30749e978a38c451a5b5c0c7352..d6bc4f7a6aa7cc3f35bdccb11d2873826120f8a9 100644 (file)
session::set('errorsAlreadyPosted',$errorsAlreadyPosted);
}
+
public static function display($s_title,$s_message,$i_type = INFO_DIALOG)
{
new msg_dialog($s_title,$s_message,$i_type);
}
+
+ public static function displayChecks($messages)
+ {
+ /* Assemble the message array to a plain string */
+ foreach ($message as $error){
+ msg_dialog::display(_("Error"), $error, ERROR_DIALOG);
+ }
+ }
+
+
public function get_ID()
{
return($this->i_ID);
index 677ebb193c86fbe16d749bfa387c3804ab54980c..972281137b136257002ad14f7b35cd9c8fea8263 100644 (file)
}
-function show_errors($message)
-{
- $complete= "";
-
- /* Assemble the message array to a plain string */
- foreach ($message as $error){
- msg_dialog::display(_("Error"), $error, ERROR_DIALOG);
- }
-}
-
-
function show_ldap_error($message, $addon= "")
{
if (!preg_match("/Success/i", $message)){