From: cajus Date: Tue, 1 Dec 2009 09:20:01 +0000 (+0000) Subject: Applied patch to disable imap folder deletion X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c498214bad9d9089bc0e8f8c658c5543531ce5b8;p=gosa.git Applied patch to disable imap folder deletion git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14851 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc b/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc index e054fa29e..97e742771 100644 --- a/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc +++ b/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc @@ -270,9 +270,16 @@ class mailMethodCyrus extends mailMethod{ $cfg= $this->ServerList[$this->MailServer]; @imap_setacl ($this->imap_handle, $this->account_id, $cfg["admin"], "lrswipcda"); - if (!imap_deletemailbox($this->imap_handle, $cfg["connect"].$this->account_id)){ - $this->error = imap_last_error(); - return (FALSE); + + if ($this->config->get_cfg_value("cyrusDeleteMailbox", "true") == "true"){ + if (!imap_deletemailbox($this->imap_handle, $cfg["connect"].$this->account_id)){ + $this->error = imap_last_error(); + return (FALSE); + } + } else{ + msg_dialog::display(_("Mail info"), + sprintf(_("LDAP entry has been removed but cyrus mailbox (%s) is kept.\nPlease delete it manually!"), + $this->account_id), INFO_DIALOG); } return (TRUE); }