From: hzerres Date: Thu, 18 Nov 2010 15:51:22 +0000 (+0000) Subject: (libgroupware) fixed behaviour of the checkboxes, too. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e97c2667ba9372763c9c8560cbd8cf450dec87ec;p=gosa.git (libgroupware) fixed behaviour of the checkboxes, too. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20277 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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"])){