Code

Updated mail Account
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 9 Dec 2008 07:21:04 +0000 (07:21 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 9 Dec 2008 07:21:04 +0000 (07:21 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13191 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mail/personal/mail/class_mail-methods.inc
gosa-plugins/mail/personal/mail/class_mailAccount.inc

index cbbfabb271149696be5c67cb321cc3a86610e6ee..88b7c64d822fe302d65c5f826d058b5bb38906dc 100644 (file)
@@ -257,12 +257,16 @@ class mailMethod{
       $str = $this->share_prefix;
     }
 
+    /* Create account prefix and respect "cyrusUseSlashes" 
+       Do not replace escaped dots for cyrusUseSlashes.
+     */
     $uattrib = $this->uattrib;
     if($this->cyrusUseSlashes){
-      $str = preg_replace("/[^\\\\]\./","/",$str);
+      $str = preg_replace('/([^\\\\])\./',"\\1/",$str);
     }
     $str = preg_replace("/\\\\([\.\/])/","\\1",$str);
     $str = trim(strtolower($str . $this->parent->$uattrib));
+
     if($this->account_id != $str){
       $this->account_id = $str;
       @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__, "accountID generated: <b>".$str."</b>","");
@@ -296,10 +300,16 @@ class mailMethod{
       $str = $this->share_prefix;
     } 
 
+    /* Create account prefix and respect "cyrusUseSlashes"
+       Do not replace escaped dots for cyrusUseSlashes.
+     */
     $uattrib = $this->uattrib;
     if($this->cyrusUseSlashes){
-      $str = preg_replace("/\./","/",$str);
+      $str = preg_replace('/([^\\\\])\./',"\\1/",$str);
     }
+    $str = preg_replace("/\\\\([\.\/])/","\\1",$str);
+    $str = trim(strtolower($str . $this->parent->$uattrib));
+
     if(preg_match("/\@/",$this->parent->$uattrib)){
       list($mail,$domain) = split("\@",$this->parent->$uattrib);
       $str = trim(strtolower($str . $mail . $folder . "@" . $domain));
@@ -478,7 +488,7 @@ class mailMethod{
    */
   public function getMailDomains()
   {
-    return(array("gonicus.de","test.intranet.de"));
+    return(array("Unconfigured"));
   } 
 
   
@@ -533,22 +543,6 @@ class mailMethod{
    */
   public function accountRemoveable(&$reason = ""){
     return(TRUE);
-
-     /* We are in administrational edit mode.
-        Check tab configurations directly * /
-
-    $
-    if(isset($this->attrs)){
-      $checkArray  = array("kolabInvitationPolicy","unrestrictedMailSize", "calFBURL","kolabDelegate","kolabFreeBusyFuture");
-      foreach($checkArray as $index){
-        if(isset($this->attrs[$index])){
-           return(true);
-        }
-      }
-    }
-    return(false);
-
-    */
   }
 
   
index 7931e167cc0c33684dae0ffb87d964d588238c22..a24f75d00d087dab450ac56dcdbd741007e4a3e5 100644 (file)
@@ -142,8 +142,8 @@ class mailAccount extends plugin
         msg_dialog::display(_("Mail error"), sprintf(_("Cannot connect mail method! Error was: %s."), 
               $this->mailMethod->get_error()), ERROR_DIALOG);
       }elseif(!$this->mailMethod->account_exists()){
-        msg_dialog::display(_("Mail error"), sprintf(_("Mailbox doesn't exists on mail server: %s."), 
-              $this->gosaMailServer), ERROR_DIALOG);
+        msg_dialog::display(_("Mail error"), sprintf(_("Mailbox '%s' doesn't exists on mail server: %s."), 
+              $this->mailMethod->get_account_id(),$this->gosaMailServer), ERROR_DIALOG);
       }
 
       /* If the doamin part is selectable, we have to split the mail address