From 41c6f6a23fbaf8c3636ff6c780dc749ad83fc0f5 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 9 Dec 2008 07:32:45 +0000 Subject: [PATCH] Updated mailAccount. -Do not write sieve settings, if the mail account wasn't created yet. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13193 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../mail/personal/mail/class_mailAccount.inc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/gosa-plugins/mail/personal/mail/class_mailAccount.inc b/gosa-plugins/mail/personal/mail/class_mailAccount.inc index a24f75d00..2a549a1f5 100644 --- a/gosa-plugins/mail/personal/mail/class_mailAccount.inc +++ b/gosa-plugins/mail/personal/mail/class_mailAccount.inc @@ -71,7 +71,6 @@ class mailAccount extends plugin var $mailMethod = NULL; var $MailDomain = ""; var $sieveManagementUsed = FALSE; - var $multiple_support = FALSE; var $vacationTemplates = array(); var $sieve_management = NULL; var $forward_dialog = FALSE; @@ -88,6 +87,7 @@ class mailAccount extends plugin "gosaMailForwardingAddress"); var $objectclasses= array("gosaMailAccount"); + var $multiple_support = TRUE; /*! \brief Initialize the mailAccount */ @@ -940,8 +940,18 @@ class mailAccount extends plugin } if (!is_integer(strpos($this->gosaMailDeliveryMode, "C"))){ - if(!$this->mailMethod->saveSieveSettings()){ - msg_dialog::display(_("Mail error"), $this->mailMethod->get_error(), ERROR_DIALOG); + + + /* Do not write sieve settings if this account is new and + doesn't seem to exist. + */ + if(!$this->initially_was_account && !$this->mailMethod->account_exists()){ + @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__, + "Skipping sieve settings, the account doesn't seem to be created already.",""); + }else{ + if(!$this->mailMethod->saveSieveSettings()){ + msg_dialog::display(_("Mail error"), $this->mailMethod->get_error(), ERROR_DIALOG); + } } }else{ -- 2.30.2