From 354630a74579a98a192bfc194852681ba51dfe06 Mon Sep 17 00:00:00 2001 From: hzerres Date: Fri, 10 Sep 2010 09:18:24 +0000 Subject: [PATCH] vacation message throws error - added a dummy text for this call. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19593 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../personal/groupware/class_groupware.inc | 56 +++++++++++++------ 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/gosa-plugins/groupware/personal/groupware/class_groupware.inc b/gosa-plugins/groupware/personal/groupware/class_groupware.inc index 2713db529..e79e1ca86 100644 --- a/gosa-plugins/groupware/personal/groupware/class_groupware.inc +++ b/gosa-plugins/groupware/personal/groupware/class_groupware.inc @@ -109,7 +109,8 @@ 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)."
"; + echo "------
Calling function:".$function."
"; $rpc = $this->config->getRpcHandle(); $res = call_user_func_array(array($rpc,$function),array_values($params)); @@ -121,7 +122,7 @@ class groupware extends plugin return($res); } public function isFeatureEnabled($featureName){ - if(!isset($this->enabledFeatures[$featureName]) && $this->enabledFeatures[$featureName]){ + if(isset($this->enabledFeatures[$featureName]) && $this->enabledFeatures[$featureName]){ return TRUE; } return FALSE; @@ -882,12 +883,12 @@ class groupware_dao{ $this->availableMethods = $this->groupwarePluginRef->rpcExec('gwGetCapabilities'); - $this->availableProperties = $this->groupwarePluginRef->rpcExec('gwGetSupportedProperties'); - $this->debug("availableProperties on init:", $this->availableProperties); + //$this->availableProperties = $this->groupwarePluginRef->rpcExec('gwGetSupportedProperties'); + //$this->debug("availableProperties on init:", $this->availableProperties); + + $this->accountLocations = $this->groupwarePluginRef->rpcExec('gwGetMailboxLocations'); + $this->debug("gwGetMailboxLocations on init:", $this->accountLocations); - $this->accountLocations = $this->groupwarePluginRef->rpcExec('gwgetMailboxLocations'); - $this->debug("availableProperties on init:", $this->accountLocations); - echo "Got the capabilities."; } public function save($feature, $valueArray){ /* @@ -925,11 +926,13 @@ class groupware_dao{ $function = groupware_dao::$gwFeatures[$feature]["delete"]; $valueArray = array_merge(array($function), $valueArray); + $result = call_user_func_array(array($this->groupwarePluginRef, 'rpcExec'), $valueArray); return $result; } public function gwFeatureAvailable($methodName){ + return $this->availableMethods[$methodName]; } public function getMailboxLocations(){ @@ -939,21 +942,42 @@ class groupware_dao{ public function getComprehensiverUser($uid){ //$hi = $this->groupwarePluginRef->rpcExec('gwGetCapabilities'); + $resultArr = array(); + if($this->groupwarePluginRef->isFeatureEnabled("primaryMail")){ + $pMail = $this->get("primaryMail", array($uid)); - - //= $this->groupwarePluginRef->rpcExec("gwAcctGetPrimaryMailAddress",$uid); - echo "pMail for $uid
";
-			print_r($pMail);
-			echo "
"; + + $resultArr["primaryMail"] = $pMail; } if($this->groupwarePluginRef->isFeatureEnabled("alternateAddresses")){ + $addresses = $this->get("alternateAddresses", array($uid)); - echo "Adresses for $uid
";
-			print_r($addresses);
-			echo "
"; + + $resultArr["alternateAddresses"] = $addresses; + } + if($this->groupwarePluginRef->isFeatureEnabled("forwardingAddresses")){ + + $addresses = $this->get("forwardingAddresses", array($uid)); + + $resultArr["forwardingAddresses"] = $addresses; } - return $pMail; + /* + * this function seems to be broken on the server. + * addding dummy + */ + if($this->groupwarePluginRef->isFeatureEnabled("vacationMessage")){ + + $vacMessage = $this->get("vacationMessage", array($uid)); + + $resultArr["vacationMessage"] = "dummy Vacation message"; + } + else{ + echo "vacationMessage not enabled."; + } + + $this->debug("getComprehensiverUser:", $resultArr); + return $resultArr; } public function debug($name, $message){ -- 2.30.2