Code

Updated opsi
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Sep 2008 14:05:11 +0000 (14:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Sep 2008 14:05:11 +0000 (14:05 +0000)
-Fixed Problem with get_host_by_module method.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12430 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_gosaSupportDaemon.inc

index b34751eee82e4b6cbdd20ec4a72573b37329c81f..ce0d24b6933aef953f774a3020db756faeae8176 100644 (file)
@@ -106,9 +106,11 @@ class gosaSupportDaemon
     $data = array("module_name" => $mod);
     $res = $this->send_data("gosa_get_hosts_with_module",$this->s_host.":".$this->i_port,$data,TRUE);
     $hosts = array();
-    if(isset($res['XML'][0]['HOST'])){
-      foreach($res['XML'][0]['HOST'] as $entry){
-        $hosts [] = $entry['VALUE'];
+    if(isset($res['XML'])){
+      foreach($res['XML'][0] as $name => $data){
+        if(preg_match("/^HOST[0-9]*$/",$name) && $name != "HSOT"){
+          $hosts[] = $data[0]['MAC'][0]['VALUE'];
+        }
       }
     }
     return($hosts);