Code

Updated support daemon
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Sep 2008 07:59:55 +0000 (07:59 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Sep 2008 07:59:55 +0000 (07:59 +0000)
-fixed get host by module,

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

gosa-core/include/class_gosaSupportDaemon.inc

index bea358f72903078d111d8c4650f8100d645fd409..ae7feceed479d6ccac85ae24f16d8a4d8e3e5157 100644 (file)
@@ -108,8 +108,12 @@ class gosaSupportDaemon
     $hosts = array();
     if(isset($res['XML'])){
       foreach($res['XML'][0] as $name => $data){
-        if(preg_match("/^HOST[0-9]*$/",$name) && $name != "HOST"){
-          $hosts[] = $data[0]['MAC'][0]['VALUE'];
+        if(preg_match("/^ANSWER[0-9]*$/",$name)){
+          if(isset($data[0]['MAC'][0]['VALUE'])){
+            $hosts[] = $data[0]['MAC'][0]['VALUE'];
+          }elseif(isset($data[0]['VALUE'])){
+            $hosts[] = $data[0]['VALUE'];
+          }
         }
       }
     }