summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/items.inc.php
diff options
context:
space:
mode:
authorsasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-04-15 11:45:59 +0000
committersasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-04-15 11:45:59 +0000
commitd2bc020f9ba35863d298d46200c8349e0f1d4396 (patch)
tree92631bb36bde1bfd5c96e56f413393f0dd7e8c82 /frontends/php/include/items.inc.php
parentaacfc8050578ab49b131a8498e1f0b17acfcf22b (diff)
downloadzabbix-d2bc020f9ba35863d298d46200c8349e0f1d4396.tar.gz
zabbix-d2bc020f9ba35863d298d46200c8349e0f1d4396.tar.xz
zabbix-d2bc020f9ba35863d298d46200c8349e0f1d4396.zip
- [ZBX-357] fixed problem with clearing error message for activated items
[svn merge svn://svn.zabbix.com/branches/1.4 -r5623:5625] git-svn-id: svn://svn.zabbix.com/trunk@5626 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/items.inc.php')
-rw-r--r--frontends/php/include/items.inc.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/frontends/php/include/items.inc.php b/frontends/php/include/items.inc.php
index 4dd3197d..ac2a8d0a 100644
--- a/frontends/php/include/items.inc.php
+++ b/frontends/php/include/items.inc.php
@@ -429,7 +429,10 @@
DBexecute("insert into items_applications (itemappid,itemid,applicationid) values($itemappid,".$itemid.",".$appid.")");
}
}
-
+
+ if ($status == ITEM_STATUS_ACTIVE)
+ DBexecute("update items set error='' where itemid=$itemid and status<>$status");
+
$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.','.