From: hickert Date: Thu, 18 Dec 2008 09:59:57 +0000 (+0000) Subject: Updated mail box folder detection X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=76fc9d034f90f5b2b2e12dbd3fcfda54ca32959d;p=gosa.git Updated mail box folder detection - A search for the account folders of "user/tester@gonicus.de" also returned folders of "user/tester2@gonicus.de" git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13315 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc b/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc index 94c7ccc18..9152a660b 100644 --- a/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc +++ b/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc @@ -292,10 +292,10 @@ class mailMethodCyrus extends mailMethod{ And prepare replacements */ if(preg_match("/\@/",$this->account_id)){ - $search = preg_replace("/\@/","*@",$this->account_id); + $search = preg_replace("/\@/","/*@",$this->account_id); $with_domain = TRUE; }else{ - $search = $this->account_id."*"; + $search = $this->account_id."/*"; $with_domain = FALSE; } $folder = $this->account_id; @@ -304,7 +304,8 @@ class mailMethodCyrus extends mailMethod{ } /* Contact imap server */ - $list = @imap_listmailbox($this->imap_handle, $cfg["connect"], $search); + $list = @imap_listmailbox($this->imap_handle, $cfg["connect"], $this->account_id); + $list = array_merge($list,@imap_listmailbox($this->imap_handle, $cfg["connect"], $search)); /* Create list of returned folder names */ if (is_array($list)){