diff options
| author | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-10-30 15:12:44 +0000 |
|---|---|---|
| committer | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-10-30 15:12:44 +0000 |
| commit | e8ec57fd3361aae7229964e6b3ae96009346d3f1 (patch) | |
| tree | 1ed425275d992898156cc7efc5c4290680cea8df /frontends/php/include/items.inc.php | |
| parent | b1128efe5e257876eb45d89e395b356033cab911 (diff) | |
| download | zabbix-e8ec57fd3361aae7229964e6b3ae96009346d3f1.tar.gz zabbix-e8ec57fd3361aae7229964e6b3ae96009346d3f1.tar.xz zabbix-e8ec57fd3361aae7229964e6b3ae96009346d3f1.zip | |
Misc changes.
git-svn-id: svn://svn.zabbix.com/trunk@3413 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/items.inc.php')
| -rw-r--r-- | frontends/php/include/items.inc.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/frontends/php/include/items.inc.php b/frontends/php/include/items.inc.php index 98a25bba..271061f5 100644 --- a/frontends/php/include/items.inc.php +++ b/frontends/php/include/items.inc.php @@ -247,7 +247,7 @@ // add items to child hosts - $db_hosts = get_hosts_by_templateid($host["hostid"]); + $db_hosts = DBselect("select hostid from hosts where templateid=".$host["hostid"]); while($db_host = DBfetch($db_hosts)) { // recursion @@ -355,6 +355,10 @@ DBexecute("update items set lastlogsize=0 where itemid=$itemid and key_<>".zbx_dbstr($key)); + if($templateid==0){ + update_item_status($itemid, $status); + } + $result = DBexecute("delete from items_applications where itemid=$itemid"); foreach($applications as $appid) { @@ -364,7 +368,7 @@ $result=DBexecute( "update items set description=".zbx_dbstr($description).",key_=".zbx_dbstr($key).",". - "hostid=$hostid,delay=$delay,history=$history,nextcheck=0,type=$type,status=".$status.','. + "hostid=$hostid,delay=$delay,history=$history,nextcheck=0,type=$type,". "snmp_community=".zbx_dbstr($snmp_community).",snmp_oid=".zbx_dbstr($snmp_oid).",". "value_type=$value_type,trapper_hosts=".zbx_dbstr($trapper_hosts).",". "snmp_port=$snmp_port,units=".zbx_dbstr($units).",multiplier=$multiplier,delta=$delta,". |
