summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 41f0116)
raw | patch | inline | side by side (parent: 41f0116)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 9 Jan 2008 15:48:23 +0000 (15:48 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 9 Jan 2008 15:48:23 +0000 (15:48 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8265 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_mail-methods-cyrus.inc | patch | blob | history |
diff --git a/gosa-core/include/class_mail-methods-cyrus.inc b/gosa-core/include/class_mail-methods-cyrus.inc
index 580c18c346a0ff8e0ec8f8885784c7bb29b732bf..388a5a715eed93704a3f50d72b4f68a7ec1cd376 100644 (file)
/* Connect to IMAP server. I don't want to see these warning here... */
$this->gosaMailServer= $gosaMailServer;
if (!isset($this->config[$gosaMailServer])){
- print_red(_("Warning: Account has an invalid mailserver string!"));
+ msg_dialog::display(_("Warning"), _("Mail server for this account is invalid!"), WARNING_DIALOG);
} else {
$cfg= $this->config[$gosaMailServer];
}
/* Mailbox reachable? */
if ($this->mbox === FALSE){
- print_red (_("Warning: IMAP Server cannot be reached! If you save this account, some mail settings will not be stored on your server!"));
+ msg_dialog::display(_("IMAP error"), _("Cannot store mail settings on IMAP server!"), ERROR_DIALOG);
return (FALSE);
}
return (TRUE);
$list = imap_listmailbox($this->mbox, $cfg["connect"], $folder);
if ($list === FALSE){
if (!imap_createmailbox($this->mbox, $cfg["connect"]. $folder)){
- print_red(sprintf(_("Can't create IMAP mailbox. Server says '%s'."), imap_last_error()));
+ msg_dialog::display(_("IMAP error"), sprintf(_("Cannot create IMAP mailbox: %s"), '<br><br><i>'.imap_last_error().'</i>'), ERROR_DIALOG);
return;
}
}
/* Write mail quota */
if (!imap_set_quota($this->mbox, $folder, $gosaMailQuota)){
- print_red(sprintf(_("Can't write IMAP quota. Server says '%s'."), imap_last_error()));
+ msg_dialog::display(_("IMAP error"), sprintf(_("Cannot modify IMAP mailbox quota: %s"), '<br><br><i>'.imap_last_error().'</i>'), ERROR_DIALOG);
return (FALSE);
}
return (TRUE);
}
}
} else {
- print_red (_("Warning: imap_getacl is not implemented, can't remove acl informations."));
+ msg_dialog::display(_("Internal error"), _("Cannot remove IMAP ACL: imap_getacl not implemented!"), ERROR_DIALOG);
}
/* Set permissions for this folder */
/* imap_getacl available? */
if (!function_exists('imap_getacl')){
- print_red (_("Warning: imap_getacl is not available, can't get imap permissions!"));
+ msg_dialog::display(_("Internal error"), _("Cannot retrieve IMAP ACL: imap_getacl not implemented!"), ERROR_DIALOG);
}
/* Get permissions in case of shared folders */
$cfg= $this->config[$this->gosaMailServer];
imap_setacl ($this->mbox, $folder, $cfg["admin"], "lrswipcda");
if (!imap_deletemailbox($this->mbox, $cfg["connect"].$folder)){
- print_red(sprintf(_("Can't remove IMAP mailbox. Server says '%s'."), imap_last_error()));
+ msg_dialog::display(_("IMAP error"), sprintf(_('Cannot remove IMAP mailbox: %s'), '<br><br><i>'.imap_last_error().'</i>'), ERROR_DIALOG);
return (FALSE);
}
return (TRUE);
$cfg["password"], $cfg["admin"]);
if (!$sieve->sieve_login()){
- print_red(sprintf(_("Can't log into SIEVE server. Server says '%s'."),
- to_string($sieve->error_raw)));
+ msg_dialog::display(_("SIEVE error"), sprintf(_("Cannot log into SIEVE server: %s"), '<br><br><i>'.to_string($sieve->error_raw).'</i>'), ERROR_DIALOG);
return;
}
/* get old GOsa script */
if(!$sieve->sieve_getscript("gosa")){
- print_red(sprintf(_("Can't get sieve script. Server says '%s'."), to_string($sieve->error_raw)));
+ msg_dialog::display(_("SIEVE error"), sprintf(_("Cannot retrieve SIEVE script: %s"), '<br><br><i>'.to_string($sieve->error_raw).'</i>'), ERROR_DIALOG);
return;
}
/* Upload script and make it the default one */
if (!$sieve->sieve_sendscript("gosa", $script)){
- print_red(sprintf(_("Can't send sieve script. Server says '%s'."), to_string($sieve->error_raw)));
+ msg_dialog::display(_("SIEVE error"), sprintf(_("Cannot store SIEVE script: %s"), '<br><br><i>'.to_string($sieve->error_raw).'</i>'), ERROR_DIALOG);
return;
}
if(!$sieve->sieve_setactivescript("gosa")){
- print_red(sprintf(_("Can't activate GOsa sieve script. Server says '%s'."), to_string($sieve->error_raw)));
+ msg_dialog::display(_("SIEVE error"), sprintf(_("Cannot activate SIEVE script: %s"), '<br><br><i>'.to_string($sieve->error_raw).'</i>'), ERROR_DIALOG);
return;
}