From: hickert Date: Thu, 14 Aug 2008 13:13:05 +0000 (+0000) Subject: Added folder prefix variable. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=711cebde38fbf8ef8b24098d2ed649a6c67fd4b5;p=gosa.git Added folder prefix variable. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12214 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-golab.inc b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-golab.inc index 614a20038..7c656a606 100644 --- a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-golab.inc +++ b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-golab.inc @@ -25,6 +25,10 @@ class mailMethodGolab extends mailMethodCyrus var $gosaMailServer= ""; var $uattrib= "mail"; + var $folder_prefix = ""; + var $user_prefix = "user/"; + + var $attribute_map= array("gosaMailAlternateAddress" => "alias", "gosaMailQuota" => "cyrus-userquota", "gosaMailServer" => "kolabHomeServer"); diff --git a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc index 775244aa6..1c7db73a4 100644 --- a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc +++ b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc @@ -25,6 +25,9 @@ class mailMethodKolab extends mailMethodCyrus var $gosaMailServer= ""; var $uattrib= "mail"; + var $folder_prefix = "shared."; + var $user_prefix = "user/"; + var $attribute_map= array("gosaMailAlternateAddress" => "alias", "gosaMailQuota" => "cyrus-userquota", "gosaMailServer" => "kolabHomeServer"); @@ -96,7 +99,7 @@ class mailMethodKolab extends mailMethodCyrus So overwrite uid to match these folder names. Else we can't read quota settings etc. #FIXME is there a better way to detect if it is 'shared.' or 'shared+' or 'kolab+shared.' or what ever ?*/ if(get_class($mailObject) == "mailgroup"){ - $mailObject->uid = "shared.".$mailObject->uid."@".preg_replace("/^.*@/","",$mailObject->mail); + $mailObject->uid = $this->folder_prefix.$mailObject->uid."@".preg_replace("/^.*@/","",$mailObject->mail); } /* Convert attributes and objectClasses */ @@ -226,7 +229,7 @@ class mailMethodKolab extends mailMethodCyrus /* Kolab shared folder names are like ' shared.uid@server.de ' So overwrite uid to match these folder names. Else we can't read quota settings etc. #FIXME is there a better way to detect if it is 'shared.' or 'shared+' or 'kolab+shared.' or what ever ?*/ - $mailObject->uid = "shared.".$mailObject->uid."@".preg_replace("/^.*@/","",$mailObject->mail); + $mailObject->uid = $this->folder_prefix.$mailObject->uid."@".preg_replace("/^.*@/","",$mailObject->mail); /* Assign new acls */ $mailObject->attrs['acl']= array(); @@ -258,7 +261,7 @@ class mailMethodKolab extends mailMethodCyrus /* Kolab shared folder names are like ' shared.uid@server.de ' So overwrite uid to match these folder names. Else we can't read quota settings etc. #FIXME is there a better way to detect if it is 'shared.' or 'shared+' or 'kolab+shared.' or what ever ?*/ - $mailObject->uid = "shared.".$mailObject->uid."@".preg_replace("/^.*@/","",$mailObject->mail); + $mailObject->uid = $this->folder_prefix.$mailObject->uid."@".preg_replace("/^.*@/","",$mailObject->mail); } }