summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 711cebd)
raw | patch | inline | side by side (parent: 711cebd)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 14 Aug 2008 13:13:29 +0000 (13:13 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 14 Aug 2008 13:13:29 +0000 (13:13 +0000) |
-Added folder and user prefix varible
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12215 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12215 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 e04ccaaa350d8021ce750afc3a9dddf4b9ce0f53..c1e524199f39a397d44d440dcae2c0fb2ecc6ccc 100644 (file)
var $gosaMailServer= "";
var $uattrib= "uid";
+ var $folder_prefix = "share.";
+ var $user_prefix = "user.";
+
function mailMethodCyrus(&$config)
{
/* Check if the mail account identification attribute
trigger_error(sprintf("Unsupported MAIL_ATTRIB in gosa configuration specified, use 'mail' or 'uid', instead of '%s'.", $new_uattrib));
}
}
+
+ /* Create the account prefix user. user/
+ Preset folder prefix. Will change it later to respect
+ altnamespace. */
+ if ($config->get_cfg_value("cyrusunixstyle") == "true"){
+ $this->user_prefix= "user/";
+ }
$this->config= $config->data['SERVERS']['IMAP'];
}
diff --git a/gosa-plugins/mail/personal/mail/class_mail-methods.inc b/gosa-plugins/mail/personal/mail/class_mail-methods.inc
index 422145069d0b0f57c29b7cba695b39dfd7465c78..a1f2af0ecf2ba438b39cc1b9a580bd3882cd4b6f 100644 (file)
class mailMethod
{
var $uattrib= "uid";
+ var $folder_prefix = "";
+ var $user_prefix = "";
function mailMethod(&$config)
{
diff --git a/gosa-plugins/mail/personal/mail/class_mailAccount.inc b/gosa-plugins/mail/personal/mail/class_mailAccount.inc
index 4918868bec066c7ef7ed8eb2e8952063e03a5ba2..23ff5785bbd13934f0473bb8b67b9bda3c7953d8 100644 (file)
var $quotaUsage = 0;
var $forward_dialog = FALSE;
+ var $user_prefix = "";
var $folder_prefix = "";
+
var $mailboxList = array("INBOX");
var $default_permissions = "none";
var $member_permissions = "post";
}
}
-
- /* Create the account prefix user. user/
- Preset folder prefix. Will change it later to respect
- altnamespace. */
- if ($this->config->get_cfg_value("cyrusunixstyle") == "true"){
- $this->folder_prefix= "user/";
- } else {
- $this->folder_prefix= "user.";
- }
+ /* get user and folder prefix */
+ $method = new $this->method($this->config);
+ $this->user_prefix = $method->user_prefix;
+ $this->folder_prefix = $method->folder_prefix;
+
/* This is not a new account, parse additional attributes */
if (($dn !== NULL) && ($dn != "new") && $this->is_account){
/* Only do IMAP actions if gosaMailServer attribute is set */
if (isset ($this->attrs["gosaMailServer"][0])){
- $method = new $this->method($this->config);
$id = $method->uattrib;
/* Adapt attributes if needed */
if ($method->connect($this->attrs["gosaMailServer"][0])){
/* Update quota values */
- $quota= $method->getQuota($this->folder_prefix.$this->$id);
+ $quota= $method->getQuota($this->user_prefix.$this->$id);
if($quota){
if ($quota['gosaMailQuota'] == 2147483647){
}
/* Get mailboxes / folder like INBOX ..*/
- $this->mailboxList= $method->getMailboxList($this->folder_prefix.$this->$id,$this->$id);
+ $this->mailboxList= $method->getMailboxList($this->user_prefix.$this->$id,$this->$id);
$method->disconnect();
}else{
if ($method->connect($this->gosaMailServer)){
/* Remove account from IMAP server */
- $method->deleteMailbox($this->folder_prefix.$this->$id);
+ $method->deleteMailbox($this->user_prefix.$this->$id);
$method->disconnect();
}
}
if (!$this->is_template){
if ($method->connect($this->gosaMailServer)){
- $method->updateMailbox($this->folder_prefix.$this->$id);
+ $method->updateMailbox($this->user_prefix.$this->$id);
- $method->setQuota($this->folder_prefix.$this->$id, $this->gosaMailQuota);
+ $method->setQuota($this->user_prefix.$this->$id, $this->gosaMailQuota);
$method->disconnect();
/* Ensure that this is an existing account */