summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/graphs.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-22 14:12:44 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-22 14:12:44 +0000
commit6a552162aec2f5792283711b4045b2a46eb51cd0 (patch)
tree6aa24787e5f4e11455d494b2b79ddc2493793419 /frontends/php/include/graphs.inc.php
parentd25027cf11279e91edd6658f4c5f9e7a35231b43 (diff)
- fixed graph duplication (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2878 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/graphs.inc.php')
-rw-r--r--frontends/php/include/graphs.inc.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/frontends/php/include/graphs.inc.php b/frontends/php/include/graphs.inc.php
index 9abdf176..552a47a4 100644
--- a/frontends/php/include/graphs.inc.php
+++ b/frontends/php/include/graphs.inc.php
@@ -215,8 +215,12 @@
$host = get_host_by_itemid($itemid);
if($gitemid && $host["status"]==HOST_STATUS_TEMPLATE)
{// add to child graphs
- $gitems = get_graphitems_by_graphid($graphid);
- if(DBfetch($gitems))
+ $item_num = DBfetch(DBselect(
+ 'select count(*) as num from graphs_items where graphid='.$graphid.
+ ' order by itemid,drawtype,sortorder,color,yaxisside'
+ ));
+
+ if($item_num['num'] == 1)
{// create graphs for childs with item
$chd_hosts = get_hosts_by_templateid($host["hostid"]);
while($chd_host = DBfetch($chd_hosts))
@@ -253,7 +257,7 @@
$childs = get_graphs_by_templateid($graphid);
while($child = DBfetch($childs))
{
- $chd_hosts = get_hosts_by_graphid($child["graphid"]);
+ ! $chd_hosts = get_hosts_by_graphid($child["graphid"]);
$chd_host = DBfetch($chd_hosts);
$db_items = DBselect("select itemid from items".
" where key_=".zbx_dbstr($item["key_"]).