From: cajus Date: Thu, 10 Jan 2008 15:57:53 +0000 (+0000) Subject: Removed print_red X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=678c8c417e2ff6928122e7ebe3ea8436b3a9fabf;p=gosa.git Removed print_red git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8297 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/personal/connectivity/class_kolabAccount.inc b/gosa-core/plugins/personal/connectivity/class_kolabAccount.inc index 1ff95fe53..a9149d4dc 100644 --- a/gosa-core/plugins/personal/connectivity/class_kolabAccount.inc +++ b/gosa-core/plugins/personal/connectivity/class_kolabAccount.inc @@ -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; } diff --git a/gosa-core/plugins/personal/connectivity/class_opengwAccount.inc b/gosa-core/plugins/personal/connectivity/class_opengwAccount.inc index ff96e458e..f61846022 100644 --- a/gosa-core/plugins/personal/connectivity/class_opengwAccount.inc +++ b/gosa-core/plugins/personal/connectivity/class_opengwAccount.inc @@ -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 */ diff --git a/gosa-core/plugins/personal/connectivity/class_oxchangeAccount.inc b/gosa-core/plugins/personal/connectivity/class_oxchangeAccount.inc index ce4288fbb..e5c8d5bbe 100644 --- a/gosa-core/plugins/personal/connectivity/class_oxchangeAccount.inc +++ b/gosa-core/plugins/personal/connectivity/class_oxchangeAccount.inc @@ -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")." "._("Openexchange")." :"._("Couldn't connect to postgresql database!")); + msg_dialog::display(_("Error"), _("Cannot connect to database!"), ERROR_DIALOG); return; } }else{ - print_red(_("Connectivity")." "._("Openexchange")." :"._("Needed parameters for openexchange connectivity plugin are missing!")); + msg_dialog::display(_("Configuration error"), _("Database configuration missing!"), ERROR_DIALOG); return; } }else{ - print_red(_("Connectivity")." "._("Openexchange")." :"._("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 "
".print_r($this->attrs, true)."
";*/ - - /*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")." : "._("Connectivity addon")."", + "plShortName" => _("Open-Xchange"), + "plDescription" => _("Open-Xchange account settings")." : "._("Connectivity addon")."", "plSelfModify" => TRUE, "plDepends" => array("user"), "plPriority" => 27, // Position in tabs