Code

Removed print_red from class_ldap.inc
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 9 Jan 2008 15:33:08 +0000 (15:33 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 9 Jan 2008 15:33:08 +0000 (15:33 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8263 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_ldap.inc

index 310aae104a2e7463a0dcce63e07d628c642bd8b8..96a7e56ee679444c3902766fca45e608bd821bf2 100644 (file)
@@ -193,7 +193,7 @@ class LDAP{
       if($this->max_ldap_query_time){
         $diff = get_MicroTimeDiff($start,microtime());
         if($diff > $this->max_ldap_query_time){
-          print_red(sprintf(_("The LDAP server is slow (%.2fs for the last query). This may be responsible for performance breakdowns."),$diff)) ;
+          msg_dialog::display(_("Performance warning"), sprintf(_("LDAP performance is poor: last query took about %.2fs!"), $diff), WARNING_DIALOG);
         }
       }
 
@@ -225,7 +225,7 @@ class LDAP{
       if($this->max_ldap_query_time){
         $diff = get_MicroTimeDiff($start,microtime());
         if($diff > $this->max_ldap_query_time){
-          print_red(sprintf(_("The ldapserver is answering very slow (%.2f), this may be responsible for performance breakdowns."),$diff)) ;
+          msg_dialog::display(_("Performance warning"), sprintf(_("LDAP performance is poor: last query took about %.2fs!"), $diff), WARNING_DIALOG);
         }
       }
 
@@ -558,7 +558,7 @@ class LDAP{
             }elseif($type=="freeze"){
               $attr['FAIstate'] ="freeze";
             }else{
-              print_red(_("Unknown FAIstate %s"),$type);
+              msg_dialog::display(_("Internal error"), sprintf(_("FAIstate '%s' is unknown!"),$type), ERROR_DIALOG);
             }
           }
 
@@ -719,7 +719,7 @@ class LDAP{
 
           /* Bail out, if we've nothing to do... */
           if ($ocname == ""){
-            print_red(sprintf(_("Autocreation of subtree failed. No objectClass found for attribute '%s'."), $type));
+            msg_dialog::display(_("Internal error"), sprintf(_("Cannot automatically create subtrees with RDN '%s': no object class found"),$type), ERROR_DIALOG);
             display_error_page();
           }
 
@@ -767,7 +767,7 @@ class LDAP{
               $na["dc"]= $param;
               break;
             default:
-              print_red(sprintf(_("Autocreation of type '%s' is currently not supported. Please report to the GOsa team."), $type));
+              msg_dialog::display(_("Internal error"), sprintf(_("Cannot automatically create subtrees with RDN '%s': not supported"),$type), ERROR_DIALOG);
               display_error_page();
           }