From e97c2667ba9372763c9c8560cbd8cf450dec87ec Mon Sep 17 00:00:00 2001 From: hzerres Date: Thu, 18 Nov 2010 15:51:22 +0000 Subject: [PATCH] (libgroupware) fixed behaviour of the checkboxes, too. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20277 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../personal/groupware/class_Groupware.inc | 11 ++++++ .../personal/groupware/class_GroupwareDao.inc | 39 +++++++++++++++---- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc index b5b896a1f..b6e78e684 100644 --- a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc +++ b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc @@ -855,6 +855,17 @@ class Groupware extends plugin $this->hasFeaturebeenChanged("mailBoxSendSizelimit") || $this->hasFeaturebeenChanged("quotaSize") || $this->hasFeaturebeenChanged("mailBoxAutomaticRemoval") )){ + + if(!$this->mailBoxWarnLimitEnabled){ + $this->mailBoxWarnLimitValue = null; + } + + if(!$this->mailBoxSendSizelimitEnabled){ + $this->mailBoxSendSizelimitValue = null; + } + + + $quota = array( "warn_limit" => $this->mailBoxWarnLimitValue, "send_limit" => $this->mailBoxSendSizelimitValue, "hard_limit" => $this->quotaSize); diff --git a/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc b/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc index 887f597a0..b53a7bcbd 100644 --- a/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc +++ b/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc @@ -180,21 +180,44 @@ class GroupwareDao{ $resultArr["mailLocation"] = $comp["mailLocation"]; //Quota things. $resultArr["quotaSize"] = $comp["quota"]["usage"]; - - $resultArr["mailBoxWarnLimitEnabled"] = TRUE; + if(!empty($comp["quota"]["warn_limit"])){ + $resultArr["mailBoxWarnLimitEnabled"] = TRUE; + } + else{ + $resultArr["mailBoxWarnLimitEnabled"] = FALSE; + } $resultArr["mailBoxWarnLimitValue"] = $comp["quota"]["warn_limit"]; - $resultArr["mailBoxSendSizelimitEnabled"] = TRUE; + if(!empty($comp["quota"]["send_limit"])){ + $resultArr["mailBoxSendSizelimitEnabled"] = TRUE; + } + else{ + $resultArr["mailBoxSendSizelimitEnabled"] = FALSE; + } + $resultArr["mailBoxSendSizelimitValue"] = $comp["quota"]["send_limit"]; - - $resultArr["mailBoxHardSizelimitEnabled"] = TRUE; + if(!empty($comp["quota"]["hard_limit"])){ + $resultArr["mailBoxHardSizelimitEnabled"] = TRUE; + } + else{ + $resultArr["mailBoxHardSizelimitEnabled"] = FALSE; + } $resultArr["mailBoxHardSizelimitValue"] = $comp["quota"]["hard_limit"]; //Mail Limits - $resultArr["mailLimitReceiveEnabled"] = TRUE; + if(!empty($comp["mailLimits"]["receive"])){ + $resultArr["mailLimitReceiveEnabled"] = TRUE; + } + else{ + $resultArr["mailLimitReceiveEnabled"] = FALSE; + } $resultArr["mailLimitReceiveValue"] = $comp["mailLimits"]["receive"]; - - $resultArr["mailLimitSendEnabled"] = TRUE; + if(!empty($comp["mailLimits"]["send"])){ + $resultArr["mailLimitSendEnabled"] = TRUE; + } + else{ + $resultArr["mailLimitSendEnabled"] = FALSE; + } $resultArr["mailLimitSendValue"] = $comp["mailLimits"]["send"]; if(empty($comp["vacation"]["message"])){ -- 2.30.2