Code

There was an error initalising the mailserver ...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 2 Mar 2006 09:05:43 +0000 (09:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 2 Mar 2006 09:05:43 +0000 (09:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2800 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/mail/class_mailAccount.inc

index 73ce759dfd631d174a0bb96bec300d6b4a3cbf98..ee74aafce87b44b068459c130e1363a256d166c7 100644 (file)
@@ -102,6 +102,7 @@ class mailAccount extends plugin
 
       /* Only do IMAP actions if gosaMailServer attribute is set */
       if (isset ($this->attrs["gosaMailServer"][0])){
+
         $method= new $this->method($this->config);
         $id= $method->uattrib;
         if ($method->connect($this->attrs["gosaMailServer"][0])){
@@ -154,6 +155,10 @@ class mailAccount extends plugin
       register_global("mailfilter", $mailfilter);
     }
 
+    if(is_array($this->gosaMailServer) && isset($this->gosaMailServer[0])){
+      $this->gosaMailServer = $this->gosaMailServer[0];
+    }
+
     /* Save initial account state */
     $this->initially_was_account= $this->is_account;
   }
@@ -664,6 +669,7 @@ $ldap->modify ($this->attrs);
 
     /* Only do IMAP actions if we are not a template */
     if (!$this->is_template){
+
       if ($method->connect($this->gosaMailServer)){
         $method->updateMailbox($this->folder_prefix.$this->$id);
         $method->setQuota($this->folder_prefix.$this->$id, $this->gosaMailQuota);