summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a689bb1)
raw | patch | inline | side by side (parent: a689bb1)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 9 Oct 2008 10:50:13 +0000 (10:50 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 9 Oct 2008 10:50:13 +0000 (10:50 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12653 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_gosaSupportDaemon.inc | patch | blob | history |
diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc
index 9b5a6ac83b1d92aa53639d4f276bbdde6c6d6cb6..3d42381e2e3e58fbfc42137a0d7537916161b65a 100644 (file)
$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'])){
+ if(isset($res['XML'][0])){
foreach($res['XML'][0] as $name => $data){
if(preg_match("/^ANSWER[0-9]*$/",$name)){
- if(isset($data[0]['MAC'][0]['VALUE'])){
+ if(isset($data[0]['MAC'][0]['VALUE']) && $data[0]['MAC'][0]['VALUE'] != ""){
$hosts[] = $data[0]['MAC'][0]['VALUE'];
- }elseif(isset($data[0]['VALUE'])){
- $hosts[] = $data[0]['VALUE'];
- }
+ } elseif(isset($data[0]['IP'][0]['VALUE']) && $data[0]['IP'][0]['VALUE'] != "") {
+ $hosts[] = $data[0]['IP'][0]['VALUE'];
+ }
}
}
}
+
return($hosts);
}