Code

vacation message throws error - added a dummy text for this call.
authorhzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 10 Sep 2010 09:18:24 +0000 (09:18 +0000)
committerhzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 10 Sep 2010 09:18:24 +0000 (09:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19593 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/groupware/personal/groupware/class_groupware.inc

index 2713db52957ff2cc466014f30f9da5b7f553d098..e79e1ca86fa14d7a4d8c6022161fd4519e814c6e 100644 (file)
@@ -109,7 +109,8 @@ class groupware extends plugin
     {
         $params = func_get_args();
         unset($params[0]);
-       echo "Calling function:".$function." Params".var_dump($params)."<br>";
+       //echo "------<br>Calling function:".$function." Params".var_dump($params)."<br>";
+       echo "------<br>Calling function:".$function."<br>";
      
         $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<pre>";
-                       print_r($pMail);
-                       echo "</pre>";
+                       
+                       $resultArr["primaryMail"] = $pMail;
                }
                if($this->groupwarePluginRef->isFeatureEnabled("alternateAddresses")){
+                       
                        $addresses = $this->get("alternateAddresses", array($uid));
-                       echo "Adresses for $uid<pre>";
-                       print_r($addresses);
-                       echo "</pre>";
+                       
+                       $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){