Code

Fixed some Translation Strings.
[gosa.git] / plugins / personal / mail / class_mailAccount.inc
index 95f44a247f7023a9cd8183e086fe1829a1a292fd..ccab73185e972f58ea1e8578f7490a88566d2e23 100644 (file)
@@ -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 */
@@ -140,7 +147,7 @@ class mailAccount extends plugin
           }else{
             $this->quotaUsage     = "";
             $this->gosaMailQuota  = "";
-            print_red(sprintf(_("Can't get quota for for '%s'."),$this->folder_prefix.$this->$id));
+            print_red(sprintf(_("Can't get quota information for '%s'."),$this->folder_prefix.$this->$id));
           }
 
           /* Get mailboxes / folder like INBOX ..*/
@@ -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: