From 3257a2f452cc68fcb86af3f7024c50225aecaa5c Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 30 Jun 2006 03:57:08 +0000 Subject: [PATCH] Fixed gosaMailServer attribute, which possibly is an array if mail tab wasn't opened- git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3998 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/mail/class_mailAccount.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc index db93e3005..1562556ea 100644 --- a/plugins/personal/mail/class_mailAccount.inc +++ b/plugins/personal/mail/class_mailAccount.inc @@ -124,6 +124,13 @@ class mailAccount extends plugin /* Adapt attributes if needed */ $method->fixAttributesOnLoad($this); + + /* FixAttributesOnLoad possibly creates an array out of gosaMailServer. + If the mail tab wasn't opened once before saving, the account can't be saved */ + if(is_array($this->gosaMailServer)){ + $this->gosaMailServer = $this->gosaMailServer[0]; + } + if ($method->connect($this->attrs["gosaMailServer"][0])){ /* Update quota values */ -- 2.30.2