Code

(libgroupware) fixed behaviour of the checkboxes, too.
authorhzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 Nov 2010 15:51:22 +0000 (15:51 +0000)
committerhzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 Nov 2010 15:51:22 +0000 (15:51 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20277 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/groupware/personal/groupware/class_Groupware.inc
gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc

index b5b896a1f2f2807904349fb1209ba4b9cb7f012f..b6e78e6849d0ee2fe377ee816ab6d305d058a85f 100644 (file)
@@ -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);
index 887f597a0c7ba430997916a8e6786286b91ca867..b53a7bcbdae9ee7384ec7684ef664bf01102a09a 100644 (file)
@@ -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"])){