Code

fixed the forward addresses - stuck on getting the from the server.
authorhzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 29 Sep 2010 11:46:28 +0000 (11:46 +0000)
committerhzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 29 Sep 2010 11:46:28 +0000 (11:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19848 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 3fc734804ef20c9a33af51da520ab8c4d8177934..448a5cda7f006239e050a7e3591c273c6426af99 100644 (file)
@@ -92,7 +92,6 @@ class Groupware extends plugin
         $this->init();
     }
 
-
     /*! \brief  Try to execute a function on the gosa backend using json-rpc.
      *          This method also takes care about errors and sets the required
      *           class members, such as rpcError and rpcErrorMessage. 
@@ -104,7 +103,7 @@ class Groupware extends plugin
     {
         $params = func_get_args();
         unset($params[0]);
-        //echo "------<br>Calling function:".$function." Params".var_dump($params)."<br>";
+        echo "------<br>Calling function:".$function." Params".var_dump($params)."<br>";
 
         $rpc = $this->config->getRpcHandle();
 
@@ -695,10 +694,9 @@ class Groupware extends plugin
             $this->groupwareDao->save("primaryMail", $this->uid, $this->mailAddress);
         }\r
 
-        // Save alternateAddresses and forwarding. 
-\r
+        // Save alternateAddresses and forwarding. \r
 \r
-        if(!empty($this->forwardingAddresses) 
+        if(!empty($this->alternateAddresses) 
                        && isset($this->alternateAddresses) 
                        && is_array($this->alternateAddresses)){
                        $this->groupwareDao->save("alternateAddresses", $this->uid, array($this->alternateAddresses));
@@ -706,8 +704,13 @@ class Groupware extends plugin
         }\r
         if(!empty($this->forwardingAddresses) 
                        && isset($this->forwardingAddresses) 
-                       && is_array($this->forwardingAddresses)){
-                       $this->groupwareDao->save("forwardingAddresses", $this->uid, array($this->forwardingAddresses));
+                       && is_array($this->forwardingAddresses)){\r
+                               \r
+                               $fw = array();
+                               //only the first Address will be set as forward Address.\r
+                               $fw[$this->forwardingAddresses[0]] = true;
+                       
+                       $this->groupwareDao->save("forwardingAddresses", $this->uid, array($fw));
 \r
         }
         // Save the quota
@@ -716,8 +719,8 @@ class Groupware extends plugin
             $quota = array(    "warn_limit" => $this->mailBoxWarnLimitValue,
                     "send_limit" => $this->mailBoxSendSizelimitValue,
                     "hard_limit" => $this->mailBoxHardSizelimitValue,
-                    "hold" => $this->quotaSize,
-                    "usage" => $this->quotaUsage);
+                    "hold" => $this->quotaSize);
+                    
             $this->groupwareDao->save("quotaSize", $this->uid, $quota);
         }
 
index f1c5f7f644ac6bc8e4bdd0f138f481c857fe68d1..1c6be18aeb5f9224cc19dc5e68524b151b8c4aa9 100644 (file)
@@ -166,9 +166,6 @@ class GroupwareDao{
             $resultArr["forwardingAddresses"] = $this->get("forwardingAddresses", array($uid));\r
         }\r
 \r
-        if($this->groupwarePluginRef->isFeatureEnabled("forwardingAddresses")){\r
-            $resultArr["forwardingAddresses"] = $this->get("forwardingAddresses", array($uid));\r
-        }\r
 \r
         // Location dropdownlist - only readable\r
         if($this->groupwarePluginRef->isFeatureEnabled("mailLocations")){\r