From ed8ec923f0bb97a5f888c1bd02e867225419d393 Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 22 Nov 2005 07:26:01 +0000 Subject: [PATCH] Faked quota settings - this is part to be cleaned up for the next GOsa release git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1999 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_mail-methods-cyrus.inc | 2 +- plugins/admin/groups/class_groupMail.inc | 9 +++++++-- plugins/personal/mail/class_mailAccount.inc | 11 +++++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/include/class_mail-methods-cyrus.inc b/include/class_mail-methods-cyrus.inc index 6448e94bd..e1becdae9 100644 --- a/include/class_mail-methods-cyrus.inc +++ b/include/class_mail-methods-cyrus.inc @@ -123,7 +123,7 @@ class mailMethodCyrus extends mailMethod { /* Workaround for the php imap extension */ if ($gosaMailQuota == ""){ - $gosaMailQuota= "-1"; + $gosaMailQuota= "2147483647"; } /* Write mail quota */ diff --git a/plugins/admin/groups/class_groupMail.inc b/plugins/admin/groups/class_groupMail.inc index 133c43287..395b97a4a 100644 --- a/plugins/admin/groups/class_groupMail.inc +++ b/plugins/admin/groups/class_groupMail.inc @@ -119,8 +119,13 @@ class mailgroup extends plugin } /* Update quota values */ - $this->quotaUsage= $quota['quotaUsage']; - $this->gosaMailQuota= $quota['gosaMailQuota']; + if ($quota['gosaMailQuota'] == 2147483647){ + $this->quotaUsage= ""; + $this->gosaMailQuota= ""; + } else { + $this->quotaUsage= $quota['quotaUsage']; + $this->gosaMailQuota= $quota['gosaMailQuota']; + } $method->disconnect(); } diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc index 0fddf5122..0de58c405 100644 --- a/plugins/personal/mail/class_mailAccount.inc +++ b/plugins/personal/mail/class_mailAccount.inc @@ -105,8 +105,15 @@ class mailAccount extends plugin $id= $method->uattrib; if ($method->connect($this->attrs["gosaMailServer"][0])){ $quota= $method->getQuota($this->folder_prefix.$this->$id); - $this->quotaUsage= $quota['quotaUsage']; - $this->gosaMailQuota= $quota['gosaMailQuota']; + + /* Update quota values */ + if ($quota['gosaMailQuota'] == 2147483647){ + $this->quotaUsage= ""; + $this->gosaMailQuota= ""; + } else { + $this->quotaUsage= $quota['quotaUsage']; + $this->gosaMailQuota= $quota['gosaMailQuota']; + } $this->mailboxList= $method->getMailboxList( $this->folder_prefix.$this->$id, $this->$id); -- 2.30.2