From: hzerres Date: Wed, 29 Sep 2010 11:46:28 +0000 (+0000) Subject: fixed the forward addresses - stuck on getting the from the server. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ff2f53e08d0e4fbe909471e35e13c5e72ce5b3aa;p=gosa.git fixed the forward addresses - stuck on getting the from the server. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19848 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 3fc734804..448a5cda7 100644 --- a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc +++ b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc @@ -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 "------
Calling function:".$function." Params".var_dump($params)."
"; + echo "------
Calling function:".$function." Params".var_dump($params)."
"; $rpc = $this->config->getRpcHandle(); @@ -695,10 +694,9 @@ class Groupware extends plugin $this->groupwareDao->save("primaryMail", $this->uid, $this->mailAddress); } - // Save alternateAddresses and forwarding. - + // Save alternateAddresses and forwarding. - 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 } if(!empty($this->forwardingAddresses) && isset($this->forwardingAddresses) - && is_array($this->forwardingAddresses)){ - $this->groupwareDao->save("forwardingAddresses", $this->uid, array($this->forwardingAddresses)); + && is_array($this->forwardingAddresses)){ + + $fw = array(); + //only the first Address will be set as forward Address. + $fw[$this->forwardingAddresses[0]] = true; + + $this->groupwareDao->save("forwardingAddresses", $this->uid, array($fw)); } // 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); } diff --git a/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc b/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc index f1c5f7f64..1c6be18ae 100644 --- a/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc +++ b/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc @@ -166,9 +166,6 @@ class GroupwareDao{ $resultArr["forwardingAddresses"] = $this->get("forwardingAddresses", array($uid)); } - if($this->groupwarePluginRef->isFeatureEnabled("forwardingAddresses")){ - $resultArr["forwardingAddresses"] = $this->get("forwardingAddresses", array($uid)); - } // Location dropdownlist - only readable if($this->groupwarePluginRef->isFeatureEnabled("mailLocations")){