Code

Updated mail methods
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 Dec 2008 12:10:28 +0000 (12:10 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 Dec 2008 12:10:28 +0000 (12:10 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13318 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mail/admin/groups/mail/class_groupMail.inc
gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc

index 3965203a21a5b40631c725997dfa330e76238385..4db272f2f7a475c2ca0c398dc470c814ffa46ad9 100644 (file)
@@ -59,7 +59,7 @@ class mailgroup extends plugin
         $this->$attr = $this->attrs[$attr][0];
       }
     }
-    $this->orig_cn = $this->cn;
+    $this->orig_cn = $this->uid = $this->cn;
 
     /* Intialize the used mailMethod
      */
index 9152a660b5e8844023079704e6b8d683b3f26b23..890d08fc7ba6df3cf99cdafaa7d2564992942257 100644 (file)
@@ -305,10 +305,16 @@ class mailMethodCyrus extends mailMethod{
 
     /* Contact imap server */
     $list = @imap_listmailbox($this->imap_handle, $cfg["connect"], $this->account_id);
-    $list = array_merge($list,@imap_listmailbox($this->imap_handle, $cfg["connect"], $search));
+    $list2 = @imap_listmailbox($this->imap_handle, $cfg["connect"], $search);
 
     /* Create list of returned folder names */
     if (is_array($list)){
+
+      /* Merge in subfolders */
+      if(is_array($list2)){
+        $list = array_merge($list,$list2);
+      }
+
       foreach ($list as $val){
         $str = trim(preg_replace("/^\{[^\}]*+\}/","",$val));
         if($with_domain){