summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-03-27 11:09:10 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-03-27 11:09:10 +0000
commit2777226b31ca8646c04c564f948e134e70ef10a2 (patch)
tree5833eafa9e06e68c9b6eb2c1c9eda59b8bc92098 /frontends/php/include
parent4f3ecc36c0e9efb53c5cbc936f1e7ab1f883ba5b (diff)
downloadzabbix-2777226b31ca8646c04c564f948e134e70ef10a2.tar.gz
zabbix-2777226b31ca8646c04c564f948e134e70ef10a2.tar.xz
zabbix-2777226b31ca8646c04c564f948e134e70ef10a2.zip
- [ZBX-310] merged rev. 5543:5545 of 1.4 branch (Artem) [fixes for PGSQL]
git-svn-id: svn://svn.zabbix.com/trunk@5546 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/hosts.inc.php4
-rw-r--r--frontends/php/include/triggers.inc.php6
2 files changed, 5 insertions, 5 deletions
diff --git a/frontends/php/include/hosts.inc.php b/frontends/php/include/hosts.inc.php
index bb526a55..72963034 100644
--- a/frontends/php/include/hosts.inc.php
+++ b/frontends/php/include/hosts.inc.php
@@ -453,14 +453,14 @@ require_once "include/items.inc.php";
// disable actions
$db_actions = DBselect("select distinct actionid from conditions ".
- " where conditiontype=".CONDITION_TYPE_HOST." and value=".$hostid);
+ " where conditiontype=".CONDITION_TYPE_HOST." and value=".zbx_dbstr($hostid));
while($db_action = DBfetch($db_actions))
{
DBexecute("update actions set status=".ACTION_STATUS_DISABLED.
" where actionid=".$db_action["actionid"]);
}
// delete action conditions
- DBexecute('delete from conditions where conditiontype='.CONDITION_TYPE_HOST.' and value='.$hostid);
+ DBexecute('delete from conditions where conditiontype='.CONDITION_TYPE_HOST.' and value='.zbx_dbstr($hostid));
// delete host profile
delete_host_profile($hostid);
diff --git a/frontends/php/include/triggers.inc.php b/frontends/php/include/triggers.inc.php
index 678f84dc..9e39dcb4 100644
--- a/frontends/php/include/triggers.inc.php
+++ b/frontends/php/include/triggers.inc.php
@@ -1297,15 +1297,15 @@
DBexecute("delete from sysmaps_link_triggers where triggerid=$triggerid");
// disable actions
- $db_actions = DBselect("select distinct actionid from conditions ".
- " where conditiontype=".CONDITION_TYPE_TRIGGER." and value=".$triggerid);
+ $db_actions = DBselect('select distinct actionid from conditions '.
+ " where conditiontype=".CONDITION_TYPE_TRIGGER." and value=".zbx_dbstr($triggerid));
while($db_action = DBfetch($db_actions))
{
DBexecute("update actions set status=".ACTION_STATUS_DISABLED.
" where actionid=".$db_action["actionid"]);
}
// delete action conditions
- DBexecute('delete from conditions where conditiontype='.CONDITION_TYPE_TRIGGER.' and value='.$triggerid);
+ DBexecute('delete from conditions where conditiontype='.CONDITION_TYPE_TRIGGER.' and value='.zbx_dbstr($triggerid));
$trigger = get_trigger_by_triggerid($triggerid);