Code

Fixed problems with mail folder retrieval while dot separated account ids were used 2.6
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 8 May 2012 12:57:00 +0000 (12:57 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 8 May 2012 12:57:00 +0000 (12:57 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@21153 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 0df2c97c481ccbef1b8589082e8661e63ae3e6ea..eda18ab9af03696ceb7b558b02286a7cd1afbb8d 100644 (file)
@@ -321,10 +321,18 @@ class mailMethodCyrus extends mailMethod{
        And prepare replacements 
      */ 
     if(preg_match("/\@/",$this->account_id)){
-      $search = preg_replace("/\@/","/*@",$this->account_id);
+      if($this->cyrusUseSlashes){
+        $search = preg_replace("/\@/","/*@",$this->account_id);
+      }else{
+        $search = preg_replace("/\@/",".*@",$this->account_id);
+      }
       $with_domain = TRUE;
     }else{
-      $search = $this->account_id."/*";
+      if($this->cyrusUseSlashes){
+        $search = $this->account_id."/*";
+      }else{
+        $search = $this->account_id.".*";
+      }
       $with_domain = FALSE;
     }
     $folder = $this->account_id;