Code

Update support daemon
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 23 Apr 2008 12:15:00 +0000 (12:15 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 23 Apr 2008 12:15:00 +0000 (12:15 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10650 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_gosaSupportDaemon.inc

index 3b847f8e2bda86dc1bdb1f3e30d492900965f3ae..28f77e33d3257be1a9fa80c14f986683a11d424d 100644 (file)
@@ -1353,7 +1353,22 @@ class gosaSupportDaemon
       "<target>".$server."</target>".
       "</xml>";
     
-    return($this->_send($xml_msg,TRUE));
+    $res = $this->_send($xml_msg,TRUE);
+    
+    /* Check if there are results for POLICY 
+     */
+    if(isset($res['XML']['POLICY'])){
+      
+      /* Ensure that we return an array 
+       */
+      $tmp = $res['XML']['POLICY'];
+      if(!is_array($tmp)){
+        $tmp = array($tmp);
+      }
+      return($tmp);
+    }else{
+      return(array());
+    }
   }