diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-03-15 18:11:39 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-03-15 18:11:39 +0000 |
| commit | 2e8a1c5884e9399a071bd4af5affcce5b50c9f60 (patch) | |
| tree | d949f394ca9dfb9d8e41506a847441bf63d52436 /frontends/php/include | |
| parent | 3c776210df8883b798ca26e84a9935cd46d51152 (diff) | |
| download | zabbix-2e8a1c5884e9399a071bd4af5affcce5b50c9f60.tar.gz zabbix-2e8a1c5884e9399a071bd4af5affcce5b50c9f60.tar.xz zabbix-2e8a1c5884e9399a071bd4af5affcce5b50c9f60.zip | |
Minor changes.
git-svn-id: svn://svn.zabbix.com/trunk@1694 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
| -rw-r--r-- | frontends/php/include/triggers.inc.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/frontends/php/include/triggers.inc.php b/frontends/php/include/triggers.inc.php index b02b86b7..e3c30f08 100644 --- a/frontends/php/include/triggers.inc.php +++ b/frontends/php/include/triggers.inc.php @@ -338,4 +338,36 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; } return TRUE; } + + # Add item to hardlinked hosts + + function add_trigger_to_templates($triggerid) + { + if($triggerid<=0) + { + return; + } + + $trigger=get_trigger_by_triggerid($triggerid); + + $sql="select distinct h.hostid from hosts h,functions f, items i where i.itemid=f.itemid and h.hostid=i.hostid and f.triggerid=$triggerid"; + $result=DBselect($sql); + if(DBnum_rows($result)!=1) + { + return; + } +/* + $sql="select hostid,templateid,items from hosts_templates where templateid=".$item["hostid"]; + $result=DBselect($sql); + while($row=DBfetch($result)) + { + if($row["items"]&1 == 0) continue; + $sql="select itemid from items where key_=\"".$item["key_"]."\" and hostid=".$row["hostid"]; + $result2=DBselect($sql); + if(DBnum_rows($result2)==0) + { + add_item($item["description"],$item["key_"],$row["hostid"],$item["delay"],$item["history"],$item["status"],$item["type"],$item["snmp_community"],$item["snmp_oid"],$item["value_type"],$item["trapper_hosts"],$item["snmp_port"],$item["units"],$item["multiplier"],$item["delta"],$item["snmpv3_securityname"],$item["snmpv3_securitylevel"],$item["snmpv3_authpassphrase"],$item["snmpv3_privpassphrase"],$item["formula"],$item["trends"]); + } + }*/ + } ?> |
