summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8116814)
raw | patch | inline | side by side (parent: 8116814)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 10 Jan 2008 15:57:53 +0000 (15:57 +0000) | ||
committer | cajus <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
diff --git a/gosa-core/plugins/personal/connectivity/class_kolabAccount.inc b/gosa-core/plugins/personal/connectivity/class_kolabAccount.inc
index 1ff95fe53e019759375601fa3b15b360aa9c0d00..a9149d4dcbab69b8f3c18e56ef0a5921a93b4bc2 100644 (file)
$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 {
$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 ff96e458e7532c2c81bead43c9fd4090da69d4c3..f61846022a958253f6553f2e1dbb27d4d84a8cca 100644 (file)
/* 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 */
/* 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 ce4288fbb43b5fc384b0c7bdd4ddbf8aa151cf4d..e5c8d5bbeb58096788704fa7fede56ff42b0e19f 100644 (file)
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;
}
}
}
-// plugin::save_object();
if (isset($_POST["oxchangeStatus"])){
$this->oxchangeStatus = "disabled";
} else {
$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'])){
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;
}
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;
}
}
@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);
}
}
}
static function plInfo()
{
return (array(
- "plShortName" => _("Open xchange"),
- "plDescription" => _("Open xchange account settings")." : <u>"._("Connectivity addon")."</u>",
+ "plShortName" => _("Open-Xchange"),
+ "plDescription" => _("Open-Xchange account settings")." : <u>"._("Connectivity addon")."</u>",
"plSelfModify" => TRUE,
"plDepends" => array("user"),
"plPriority" => 27, // Position in tabs