X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fpersonal%2Fmail%2Fclass_mailAccount.inc;h=ccab73185e972f58ea1e8578f7490a88566d2e23;hb=077239ddf12d4489618151c7a131f1e6bd0c854c;hp=bff7beeb0397a48690f7a5d1a423d8b8a2cdf9d8;hpb=888f9d7ce78494b0c3308f551bd0857e1ecfc0d0;p=gosa.git diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc index bff7beeb0..ccab73185 100644 --- a/plugins/personal/mail/class_mailAccount.inc +++ b/plugins/personal/mail/class_mailAccount.inc @@ -124,6 +124,13 @@ class mailAccount extends plugin /* Adapt attributes if needed */ $method->fixAttributesOnLoad($this); + + /* FixAttributesOnLoad possibly creates an array out of gosaMailServer. + If the mail tab wasn't opened once before saving, the account can't be saved */ + if(is_array($this->gosaMailServer)){ + $this->gosaMailServer = $this->gosaMailServer[0]; + } + if ($method->connect($this->attrs["gosaMailServer"][0])){ /* Update quota values */ @@ -157,9 +164,6 @@ class mailAccount extends plugin } } - - /* Get vacation message */ - /* Fill vacation array */ $this->vacation= array(); if (isset($this->config->current['VACATIONDIR'])){ @@ -379,7 +383,7 @@ class mailAccount extends plugin } - /* Vocation message */ + /* Vacation message */ /* Import vacation message? */ if (isset($_POST["import_vacation"]) && isset($this->vacation[$_POST["vacation_template"]])){ @@ -616,7 +620,7 @@ class mailAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Removing mail account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/mail account with dn '%s' failed."),$this->dn)); /* Connect to IMAP server for account deletion */ if ($this->gosaMailServer != ""){ @@ -720,7 +724,7 @@ class mailAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving mail account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/mail account with dn '%s' failed."),$this->dn)); /* Only do IMAP actions if we are not a template */ if (!$this->is_template){ @@ -969,6 +973,33 @@ class mailAccount extends plugin } } } + + + function plInfo() + { + return (array("plDescription" => _("Mail settings"), + "plSelfModify" => TRUE, + "plDepends" => array("objectClass" => "gosaAccount"), + + "mail" => _("Mail address"), + "gosaMailServer" => _("Mail server"), + "gosaMailQuota" => _("Quota size"), + "gosaMailMaxSize" => _("Mail max size"), + "gosaMailForwardingAddress" => _("Forwarding address"), + "gosaMailDeliveryMode_L" => "FIXME"._("Local delivery"), // This is flag of gosaMailDeliveryMode + "gosaMailDeliveryMode_R" => "FIXME"._("Reject due to mailsize"), // This is flag of gosaMailDeliveryMode + "gosaMailDeliveryMode_s" => "FIXME"._("Use spam filter"), // This is flag of gosaMailDeliveryMode + "gosaMailDeliveryMode_V" => "FIXME"._("Add vacation information"), // This is flag of gosaMailDeliveryMode + "gosaMailDeliveryMode_C" => "FIXME"._("Use custom sieve script"), // This is flag of gosaMailDeliveryMode + "gosaMailDeliveryMode_I" => "FIXME"._("Only insider delivery"), // This is flag of gosaMailDeliveryMode + "gosaSpamSortLevel" => _("Spam level"), + "gosaSpamMailbox" => _("Spam mail box"), + "gosaMailAlternateAddress" => _("Mail alternative addresses"), + + "gosaVacationMessage" => _("Vacation message"), + "gosaMailForwardingAddress" => _("Forwarding address"))); + + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: