diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-05-29 09:23:08 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-05-29 09:23:08 +0000 |
| commit | bf6f03c29afb2d966898e15a09616002ee435518 (patch) | |
| tree | 66528fa4e4474aabf3f553242cb030d767a45d3c /frontends/php/include/services.inc.php | |
| parent | b217a4ca56bfe943048a00754bb911d4cb84f1b0 (diff) | |
| download | zabbix-bf6f03c29afb2d966898e15a09616002ee435518.tar.gz zabbix-bf6f03c29afb2d966898e15a09616002ee435518.tar.xz zabbix-bf6f03c29afb2d966898e15a09616002ee435518.zip | |
- more fixes for IT services
git-svn-id: svn://svn.zabbix.com/trunk@4191 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/services.inc.php')
| -rw-r--r-- | frontends/php/include/services.inc.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/frontends/php/include/services.inc.php b/frontends/php/include/services.inc.php index b36dacbf..884fd353 100644 --- a/frontends/php/include/services.inc.php +++ b/frontends/php/include/services.inc.php @@ -556,7 +556,9 @@ $dt = 0; return S_UNKNOWN; } - function get_service_childs($serviceid,&$childs,$soft=0){ + function get_service_childs($serviceid,$soft=0){ + $childs = array(); + $query = 'SELECT sl.servicedownid '. ' FROM services_links sl '. ' WHERE sl.serviceupid = '.$serviceid.(($soft == 1)?(''):(' AND sl.soft <> 1')); @@ -564,8 +566,9 @@ $dt = 0; $res = DBSelect($query); while($row = DBFetch($res)){ $childs[] = $row['servicedownid']; - get_service_childs($row['servicedownid'],$childs); + $childs = array_merge($childs, get_service_childs($row['servicedownid'])); } + return $childs; } function createServiceTree(&$services,$id=0,&$temp=array(),$serviceupid=0,$parentid=0, $soft=0, $linkid=''){ |
