Code

Removed show_errors
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Mar 2008 15:53:33 +0000 (15:53 +0000)
committercajus <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

gosa-core/include/class_config.inc
gosa-core/include/class_ldap.inc
gosa-core/include/class_msg_dialog.inc
gosa-core/include/functions.inc

index bbe1c17948e94aad56f5d7975f9d5f96641765a1..963db36b3a45a2f95323c9076920585580c89ab0 100644 (file)
@@ -216,13 +216,8 @@ class config  {
 
   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']);
@@ -251,7 +246,7 @@ class config  {
       } else {
         $this->ldap->referrals= $this->current['REFERRAL'];
       }
-#    }
+    }
     return ($this->ldap);
   }
 
index 93686b6e63476d594db051f1edf22eb8e005d9ac..c01428d42f2047bd6a24f022599bd885ec7f9e59 100644 (file)
@@ -201,31 +201,11 @@ class LDAP{
   }
 
   
-# /* 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);
@@ -254,10 +234,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;
@@ -292,10 +268,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();
       $filter = "(objectclass=*)";
       $this->sr = @ldap_read($this->cid, LDAP::fix($dn), $filter,$attrs);
@@ -1324,6 +1296,7 @@ class LDAP{
 
     return ($result);
   }
+
 }
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>
index eba6b42bf13fb30749e978a38c451a5b5c0c7352..d6bc4f7a6aa7cc3f35bdccb11d2873826120f8a9 100644 (file)
@@ -83,11 +83,22 @@ class msg_dialog
                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)
@@ -1357,17 +1357,6 @@ function get_printer_list()
 }
 
 
-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)){