Code

Removed print_red
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 10 Jan 2008 15:57:53 +0000 (15:57 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 10 Jan 2008 15:57:53 +0000 (15:57 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8297 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/personal/connectivity/class_kolabAccount.inc
gosa-core/plugins/personal/connectivity/class_opengwAccount.inc
gosa-core/plugins/personal/connectivity/class_oxchangeAccount.inc

index 1ff95fe53e019759375601fa3b15b360aa9c0d00..a9149d4dcbab69b8f3c18e56ef0a5921a93b4bc2 100644 (file)
@@ -162,7 +162,7 @@ class kolabAccount extends plugin
         $valid= FALSE;
         if (!tests::is_email($address)){
           if (!tests::is_email($address, TRUE)){
-              print_red (_("You're trying to add an invalid email address to the list of delegations."));
+              msg_dialog::display(_("Error"), _("Cannot add invalid mail address!"), ERROR_DIALOG);
           }
         } else {
 
@@ -170,7 +170,7 @@ class kolabAccount extends plugin
           $ldap->cd ($this->config->current['BASE']);
           $ldap->search('(mail='.$address.')',array("mail"));
           if ($ldap->count() == 0){
-            print_red (_("The mail address you're trying to add is no primary mail address of an existing user."));
+            msg_dialog::display(_("Error"), _("Primary mail address already in use by another user!"), ERROR_DIALOG);
           } else {
             $valid= TRUE;
           }
index ff96e458e7532c2c81bead43c9fd4090da69d4c3..f61846022a958253f6553f2e1dbb27d4d84a8cca 100644 (file)
@@ -164,12 +164,12 @@ class opengwAccount extends plugin
 
                /* Check database extension */    
                if(!is_callable("pg_connect") && count($this->serverCon)){
-                       print_red(_("OpenGroupware: Your configuration is missing a postgresql extension. Can't perform any database queries."));
+      msg_dialog::display(_("Configuration error"), _("Missing postgresql extension!"), ERROR_DIALOG);
                }elseif(count($this->serverCon)){
 
                        /* Check if config exists */
                        if($this->config->search("opengwAccount", 'DATABASE',array('tabs'))){
-                               print_red(_("OpenGroupware: Missing database configuration for opengroupware. Can't get or set any informations."));
+        msg_dialog::display(_("Configuration error"), _("Missing database configuration!"), ERROR_DIALOG);
                        }else{
 
                                /* Create handle */
@@ -177,7 +177,7 @@ class opengwAccount extends plugin
 
                                /* Check if we are successfully connected to db */
                                if(!$this->handle->connected){
-                                       print_red(_("OpenGroupware: Can't connect to specified database. Please check given configuration twice."));
+          msg_dialog::display(_("Configuration error"), _("Cannot connect to database!"), ERROR_DIALOG);
                                }else{
 
                                        /* Assign LocationTeams */
index ce4288fbb43b5fc384b0c7bdd4ddbf8aa151cf4d..e5c8d5bbeb58096788704fa7fede56ff42b0e19f 100644 (file)
@@ -720,15 +720,15 @@ class oxchangeAccount extends plugin
          isset($this->oxconf["PGPASSWD"])){
         $pgcon = @pg_connect("host=".$this->oxconf["PGHOST"]." user=".$this->oxconf["PGUSER"]." password=".$this->oxconf["PGPASSWD"]." dbname=".$this->oxconf["PGDBNAME"]);
         if (! $pgcon){
-          print_red(_("Connectivity")."&nbsp;"._("Openexchange")."&nbsp;:"._("Couldn't connect to postgresql database!"));
+          msg_dialog::display(_("Error"), _("Cannot connect to database!"), ERROR_DIALOG);
           return;
         }
       }else{
-        print_red(_("Connectivity")."&nbsp;"._("Openexchange")."&nbsp;:"._("Needed parameters for openexchange connectivity plugin are missing!"));
+        msg_dialog::display(_("Configuration error"), _("Database configuration missing!"), ERROR_DIALOG);
         return;
       }
     }else{
-      print_red(_("Connectivity")."&nbsp;"._("Openexchange")."&nbsp;:"._("PHP4 module for postgresql database is missing!"));
+      msg_dialog::display(_("Configuration error"), _("Missing postgresql extension!"), ERROR_DIALOG);
       return;
     }
 
@@ -785,7 +785,6 @@ class oxchangeAccount extends plugin
       } 
     }
   
-//    plugin::save_object();
     if (isset($_POST["oxchangeStatus"])){
       $this->oxchangeStatus = "disabled";
     } else {
@@ -801,10 +800,6 @@ class oxchangeAccount extends plugin
     $needupdate=TRUE;
     $istemplate=FALSE;
 
-
-/*      print "<pre>".print_r($this->attrs, true)."</pre>";*/
-
-
     /*First at all, we must check if this is new or is updated */
     /*Also check is we have a template, if is a template, is a new user */
     if (isset($this->attrs['objectClass'])){
@@ -818,7 +813,7 @@ class oxchangeAccount extends plugin
     preg_match("/^(\w+(?=\=))=((\w|\s|\.)+(?=\,)),.*/",$this->dn,$uidarray);
     $uid=$uidarray[2];
     if (trim($uid) == "") {
-      print_red(_("The Open-Xchange accountname is empty and thus invalid! Check to make sure that you are not using any strange characters in the loginname."));
+      msg_dialog::display(_("Error"), _("Open-Xchange account name is invalid!"), ERROR_DIALOG);
       return;
     }
        
@@ -830,15 +825,15 @@ class oxchangeAccount extends plugin
         if(isset($this->oxconf["PGUSER"]) and isset($this->oxconf["PGHOST"]) and isset($this->oxconf["PGDBNAME"]) and isset($this->oxconf["PGPASSWD"])){
           $pgcon =  @pg_connect("host=".$this->oxconf["PGHOST"]." user=".$this->oxconf["PGUSER"]." password=".$this->oxconf["PGPASSWD"]." dbname=".$this->oxconf["PGDBNAME"]);
           if (! $pgcon){
-            print_red(_("Couldn't connect to postgresql database!"));
+            msg::display(_("Error"), _("Cannot connect to database!"), ERROR_DIALOG);
             return;
           }
         }else{
-          print_red(_("Needed parameters for openexchange connectivity plugin are missing!"));
+          msg_dialog::display(_("Configuration error"), _("Database configuration missing!"), ERROR_DIALOG);
           return;
         }
       }else{
-        print_red(_("PHP4 module for postgresql database is missing!"));
+        msg_dialog::display(_("Configuration error"), _("Missing postgresql extension!"), ERROR_DIALOG);
         return;
       }
     }
@@ -951,7 +946,7 @@ class oxchangeAccount extends plugin
       @pg_close($pgcon);
 
       if($error){
-        print_red(_("Something went wrong while saving oxchange account. Please check the error log file."));
+        msg_dialog::display(_("Error"), _("Cannot save Open-Xchange account!"), ERROR_DIALOG);
       }
     }
   }
@@ -961,8 +956,8 @@ class oxchangeAccount extends plugin
   static function plInfo()
   {
     return (array(
-          "plShortName"     => _("Open xchange"),
-          "plDescription"   => _("Open xchange account settings")."&nbsp;:&nbsp;<u>"._("Connectivity addon")."</u>",
+          "plShortName"     => _("Open-Xchange"),
+          "plDescription"   => _("Open-Xchange account settings")."&nbsp;:&nbsp;<u>"._("Connectivity addon")."</u>",
           "plSelfModify"    => TRUE,
           "plDepends"       => array("user"),
           "plPriority"      => 27,                                 // Position in tabs