summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5f13755)
raw | patch | inline | side by side (parent: 5f13755)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 10 Jan 2008 16:40:15 +0000 (16:40 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 10 Jan 2008 16:40:15 +0000 (16:40 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8301 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/plugins/personal/mail/class_mailAccount.inc b/gosa-core/plugins/personal/mail/class_mailAccount.inc
index 1bdd4cefb878cd7b702092ff1ec9544e31b28cd6..5a0356566f873db2df359476ab4e167a9889d10e 100644 (file)
var $plDescription = "This does something";
var $method = "mailMethod";
- /* CLI vars */
var $gosaVacationStart = 0;
var $gosaVacationStop = 0;
var $view_logged = FALSE;
if ($cls && class_exists($cls)){
$this->method= $cls;
} else {
- print_red(sprintf(_("There is no mail method '%s' specified in your gosa.conf available."), $method));
+ msg_dialog::display(_("Configuration error"), sprintf(_("Unkown mail method '%s' specified!"), $method), ERROR_DIALOG);
}
}
}else{
$this->quotaUsage = "";
$this->gosaMailQuota = "";
-// print_red(sprintf(_("Can't get quota information for '%s'."),$this->folder_prefix.$this->$id));
}
/* Get mailboxes / folder like INBOX ..*/
$line= fgets($fh, 256);
if (!preg_match('/^DESC:/', $line)){
- print_red (_("No DESC tag in vacation file:")." $file");
+ msg_dialog::display(_("Configuration error"), sprintf(_("No DESC tag in vacation template '%s'!"), $file), ERROR_DIALOG);
return $desc;
}
fclose ($fh);
if ($this->is_template){
$valid= TRUE;
} else {
- print_red (_("You're trying to add an invalid email address to the list of forwarders."));
+ msg_dialog::display(_("Error"), _("Cannot add invalid mail address!"), ERROR_DIALOG);
}
}
} elseif ($address == $this->mail
|| in_array($address, $this->gosaMailAlternateAddress)) {
- print_red (_("Adding your one of your own addresses to the forwarders makes no sense."));
+ msg_dialog::display(_("Error"),_("Cannot add your primary address to the list of forwarders.") , ERROR_DIALOG);
} else {
$valid= TRUE;
if (!tests::is_email($_POST['alternate_address'])){
if ($this->is_template){
if (!(tests::is_email($_POST['alternate_address'], TRUE))){
- print_red (_("You're trying to add an invalid email address to the list of alternate addresses."));
+ msg_dialog::display(_("Error"), _("Cannot add invalid mail address!"), ERROR_DIALOG);
} else {
$valid= TRUE;
}
} else {
- print_red (_("You're trying to add an invalid email address to the list of alternate addresses."));
+ msg_dialog::display(_("Error"), _("Cannot add invalid mail address!"), ERROR_DIALOG);
}
} else {
if ($valid && ($user= $this->addAlternate ($_POST['alternate_address'])) != ""){
$ui= get_userinfo();
if ($user != $ui->username){
- print_red (_("The address you're trying to add is already used by user")." '$user'.");
+ msg_dialog::display(_("Error"), sprintf(_("Cannot add mail address: it is already used by user '%s'."), $user), ERROR_DIALOG);
}
}
}
reset ($this->gosaMailForwardingAddress);
$this->is_modified= TRUE;
}else{
- print_red(_("You are not allowed to write mail forwarding."));
+ msg_dialog::display(_("Permission error"), _("You have no permission to modify these addresses."), ERROR_DIALOG);
}
}
$this->gosaMailForwardingAddress= array_remove_entries ($addresses, $this->gosaMailForwardingAddress);
$this->is_modified= TRUE;
}else{
- print_red(_("You are not allowed to write mail forwarding."));
+ msg_dialog::display(_("Permission error"), _("You have no permission to modify these addresses."), ERROR_DIALOG);
}
}
reset ($this->gosaMailAlternateAddress);
return ("");
}else{
- print_red(_("You are not allowed to write mail alternate address."));
+ msg_dialog::display(_("Permission error"), _("You have no permission to modify these addresses."), ERROR_DIALOG);
}
}
$this->gosaMailAlternateAddress= array_remove_entries ($addresses,$this->gosaMailAlternateAddress);
$this->is_modified= TRUE;
}else{
- print_red(_("You are not allowed to write mail alternate address."));
+ msg_dialog::display(_("Permission error"), _("You have no permission to modify these addresses."), ERROR_DIALOG);
}
}
diff --git a/gosa-core/plugins/personal/posix/class_posixAccount.inc b/gosa-core/plugins/personal/posix/class_posixAccount.inc
index 9b0aeccc68fdcfa69735034f252eacbc847d73fc..b7593981f6266526f29e4daeb43fd37e44d36746 100644 (file)
/* Oups - timed out */
if ($wait-- == 0){
- print_red (_("Failed: overriding lock"));
+ msg_dialog::display(_("Warning"), _("Timeout while waiting for lock! Ignoring lock."), WARNING_DIALOG);
break;
}
}
/* Should not happen */
if ($id == $hwm){
- print_red(_("Too many users, can't allocate a free ID!"));
+ msg_dialog::display(_("Error"), _("Cannot allocate a free ID: too many users!"), ERROR_DIALOG);
exit;
}
diff --git a/gosa-core/plugins/personal/samba/class_sambaAccount.inc b/gosa-core/plugins/personal/samba/class_sambaAccount.inc
index fc93c9c76f645d3c65c500b9cb55ddd0808675f8..598cf9a108705d897c3567a79fa9240987578986 100644 (file)
/* Generate rid / primaryGroupId */
if ($this->samba3){
if (!isset($this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['SID'])){
- print_red (_("Warning: This account has an undefined samba SID assigned. The problem can not be fixed by GOsa!"));
+ msg_dialog::display(_("Warning"), _("Undefined Samba SID detected. Please fix this problem manually!"), WARNING_DIALOG);
} else {
$this->SID= $this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['SID'];
$this->ridBase= $this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['RIDBASE'];
$ldap->cd($this->config->current['BASE']);
$ldap->search("(&(objectClass=posixGroup)(gidNumber=".$this->gidNumber."))", array("cn"));
if ($ldap->count() != 1){
- print_red(_("Warning: Can't identify users primary group - no conversion to a samba group possible!"));
+ msg_dialog::display(_("Warning"), _("Cannot convert primary group to samba group: group cannot be identified!"), WARNING_DIALOG);
} else {
$attrs= $ldap->fetch();
$g= new group($this->config, $ldap->getDN());
diff --git a/gosa-core/plugins/personal/scalix/class_scalixAccount.inc b/gosa-core/plugins/personal/scalix/class_scalixAccount.inc
index 39b99f59ad61d8fa8c4c36ce6732c8b0e99d3bee..96365949e0fd3a13a55f3b8828dfd197b20bb7e5 100644 (file)
/* Valid mail address */
if( ($this->is_template && !tests::is_email($_POST['email_address'], TRUE)) ||
(!$this->is_template && !tests::is_email($_POST['email_address'])) ){
- print_red (_("You're trying to add an invalid email address to the list of alternate addresses."));
+ msg_dialog::display(_("Error"), _("Cannot add invalid mail address!"), ERROR_DIALOG);
}else{
$valid = TRUE;
}
if ($valid && ($user= $this->addEmail ($_POST['email_address'])) != ""){
$ui= get_userinfo();
if ($user != $ui->username){
- print_red (_("The address you're trying to add is already used by user")." '$user'.");
+ msg_dialog::display(_("Error"), sprintf(_("Cannot add mail address: it is already used by user '%s'."), $user), ERROR_DIALOG);
}
}
# }
}
}
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:rulere
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler
?>