summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a3c91b2)
raw | patch | inline | side by side (parent: a3c91b2)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 17 Oct 2006 07:58:07 +0000 (07:58 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 17 Oct 2006 07:58:07 +0000 (07:58 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4887 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_mail-methods-kolab.inc | patch | blob | history |
index 2dc40c17fb77e4b9695caf110670cc3884563818..e023cc04223cf83e81d90a7e0f33d4607cc9d1ae 100644 (file)
return (TRUE);
}
+ function getMailboxList($folder, $uid= "")
+ {
+ global $config;
+ $result = array();
+
+ /* Get domain an mail address if uid is an mail address */
+ $domain = "";
+ if(preg_match("/@/",$folder)){
+ $domain = preg_replace("/^.*@/","",$folder);
+ $folder = preg_replace("/@.*$/","",$folder);
+ }
+
+ /* Get list of mailboxes for combo box */
+ $cfg= $this->config[$this->gosaMailServer];
+
+ /* Create search pattern
+ (user/kekse*@domain.de
+ user.kekse*@domain.de
+ user.kekse* )
+ depending on given folder name) */
+ $q = $folder."*@".$domain;
+ $list = imap_listmailbox($this->mbox, $cfg["connect"], $q);
+
+ /* Create list of returned folder names */
+ if (is_array($list)){
+ foreach ($list as $val){
+
+ /* Cut domain name */
+ $val = preg_replace("/@.*$/","",$val);
+ $result[]=preg_replace ("/^.*".normalizePreg($folder)."/","INBOX", imap_utf7_decode ($val));
+ }
+ }
+
+ /* Append "INBOX" to the folder array if result is empty and request comes from user dialog */
+ if(empty($result) && !empty($uid)){
+ $result[] = "INBOX";
+ }
+
+ return ($result);
+ }
+
+
/* Get quota and divide it by 1024, because in gosa we display in MB
but we get Kb */