From: hickert Date: Tue, 9 Dec 2008 07:21:04 +0000 (+0000) Subject: Updated mail Account X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=faf3e66cbb636ba952dd8a2adf778f840ef67795;p=gosa.git Updated mail Account git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13191 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/mail/personal/mail/class_mail-methods.inc b/gosa-plugins/mail/personal/mail/class_mail-methods.inc index cbbfabb27..88b7c64d8 100644 --- a/gosa-plugins/mail/personal/mail/class_mail-methods.inc +++ b/gosa-plugins/mail/personal/mail/class_mail-methods.inc @@ -257,12 +257,16 @@ class mailMethod{ $str = $this->share_prefix; } + /* Create account prefix and respect "cyrusUseSlashes" + Do not replace escaped dots for cyrusUseSlashes. + */ $uattrib = $this->uattrib; if($this->cyrusUseSlashes){ - $str = preg_replace("/[^\\\\]\./","/",$str); + $str = preg_replace('/([^\\\\])\./',"\\1/",$str); } $str = preg_replace("/\\\\([\.\/])/","\\1",$str); $str = trim(strtolower($str . $this->parent->$uattrib)); + if($this->account_id != $str){ $this->account_id = $str; @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__, "accountID generated: ".$str."",""); @@ -296,10 +300,16 @@ class mailMethod{ $str = $this->share_prefix; } + /* Create account prefix and respect "cyrusUseSlashes" + Do not replace escaped dots for cyrusUseSlashes. + */ $uattrib = $this->uattrib; if($this->cyrusUseSlashes){ - $str = preg_replace("/\./","/",$str); + $str = preg_replace('/([^\\\\])\./',"\\1/",$str); } + $str = preg_replace("/\\\\([\.\/])/","\\1",$str); + $str = trim(strtolower($str . $this->parent->$uattrib)); + if(preg_match("/\@/",$this->parent->$uattrib)){ list($mail,$domain) = split("\@",$this->parent->$uattrib); $str = trim(strtolower($str . $mail . $folder . "@" . $domain)); @@ -478,7 +488,7 @@ class mailMethod{ */ public function getMailDomains() { - return(array("gonicus.de","test.intranet.de")); + return(array("Unconfigured")); } @@ -533,22 +543,6 @@ class mailMethod{ */ public function accountRemoveable(&$reason = ""){ return(TRUE); - - /* We are in administrational edit mode. - Check tab configurations directly * / - - $ - if(isset($this->attrs)){ - $checkArray = array("kolabInvitationPolicy","unrestrictedMailSize", "calFBURL","kolabDelegate","kolabFreeBusyFuture"); - foreach($checkArray as $index){ - if(isset($this->attrs[$index])){ - return(true); - } - } - } - return(false); - - */ } diff --git a/gosa-plugins/mail/personal/mail/class_mailAccount.inc b/gosa-plugins/mail/personal/mail/class_mailAccount.inc index 7931e167c..a24f75d00 100644 --- a/gosa-plugins/mail/personal/mail/class_mailAccount.inc +++ b/gosa-plugins/mail/personal/mail/class_mailAccount.inc @@ -142,8 +142,8 @@ class mailAccount extends plugin msg_dialog::display(_("Mail error"), sprintf(_("Cannot connect mail method! Error was: %s."), $this->mailMethod->get_error()), ERROR_DIALOG); }elseif(!$this->mailMethod->account_exists()){ - msg_dialog::display(_("Mail error"), sprintf(_("Mailbox doesn't exists on mail server: %s."), - $this->gosaMailServer), ERROR_DIALOG); + msg_dialog::display(_("Mail error"), sprintf(_("Mailbox '%s' doesn't exists on mail server: %s."), + $this->mailMethod->get_account_id(),$this->gosaMailServer), ERROR_DIALOG); } /* If the doamin part is selectable, we have to split the mail address