summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d17fb81)
raw | patch | inline | side by side (parent: d17fb81)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 Oct 2006 09:17:49 +0000 (09:17 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 Oct 2006 09:17:49 +0000 (09:17 +0000) |
They use the same methods to get the foldernames.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4908 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4908 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_mail-methods-cyrus.inc | patch | blob | history | |
include/class_mail-methods-kolab.inc | patch | blob | history |
index a3e03ef50be580682ae5270df36f35077d6186d7..4e752abf6534c6c8e098793df698bbd4d25e10e6 100644 (file)
var $mbox= "-";
var $config;
var $gosaMailServer= "";
+var $uattrib= "uid";
function mailMethodCyrus($config)
{
return ($result);
}
+
+ /* return all folders of the users mailbox*/
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);
+ }
+
+
+ function getMailboxList2($folder, $uid= "")
{
/* Initialize depending on group or user mode */
if ($uid != ""){
index 0d1c7b98a8bff75507669335fc13a9815d3d9b10..0cd0e15be64829935b1086e24253cfb146265ae5 100644 (file)
return (TRUE);
}
- /* return all folders of the users mailbox*/
- 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 */
function getQuota($folder)