diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-04-17 15:02:02 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-04-17 15:02:02 +0000 |
| commit | b82812f00576369e65c996ef51264de66ce63d57 (patch) | |
| tree | a3ba8c407e03edd1905f591aa2d14bf32acc4f9b /frontends/php/include/forms.inc.php | |
| parent | cd6be85dfcfccb202f2d2a9ca9db062725e45d5c (diff) | |
| download | zabbix-b82812f00576369e65c996ef51264de66ce63d57.tar.gz zabbix-b82812f00576369e65c996ef51264de66ce63d57.tar.xz zabbix-b82812f00576369e65c996ef51264de66ce63d57.zip | |
- [DEV-137] fixes in graph zoom for KQ (Artem)
- [DEV-137] fixes for possible errors under Oracle (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5632 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/forms.inc.php')
| -rw-r--r-- | frontends/php/include/forms.inc.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php index 0c196e51..efb3273a 100644 --- a/frontends/php/include/forms.inc.php +++ b/frontends/php/include/forms.inc.php @@ -4838,13 +4838,13 @@ include_once 'include/discovery.inc.php'; $cmbType = new CComboBox("elementtype",$elementtype,"submit()"); $available_groups = get_accessible_groups_by_user($USER_DETAILS,PERM_READ_ONLY); - $available_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY); - $available_triggers = get_accessible_triggers(PERM_READ_ONLY, null, get_current_nodeid()); + $available_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY, PERM_RES_IDS_ARRAY); + $available_triggers = get_accessible_triggers(PERM_READ_ONLY, PERM_RES_IDS_ARRAY); $db_hosts = DBselect('SELECT DISTINCT n.name as node_name,h.hostid,h.host '. ' FROM hosts h'. ' LEFT JOIN nodes n on n.nodeid='.DBid2nodeid('h.hostid'). - ' WHERE h.hostid IN ('.$available_hosts.')'. + ' WHERE '.DBcondition('h.hostid',$available_hosts). ' ORDER BY node_name,h.host'); if($db_hosts) $cmbType->AddItem(SYSMAP_ELEMENT_TYPE_HOST, S_HOST); @@ -4874,8 +4874,8 @@ include_once 'include/discovery.inc.php'; $host_info = DBfetch(DBselect('SELECT DISTINCT n.name as node_name,h.hostid,h.host '. ' FROM hosts h '. ' LEFT JOIN nodes n ON n.nodeid='.DBid2nodeid("h.hostid"). - ' WHERE h.hostid IN ('.$available_hosts.') '. - ' AND hostid='.$elementid. + ' WHERE '.DBcondition('h.hostid',$available_hosts). + ' AND hostid='.$elementid. ' ORDER BY node_name,h.host')); if($host_info) $host = $host_info["host"]; @@ -4917,7 +4917,7 @@ include_once 'include/discovery.inc.php'; ' LEFT JOIN hosts h on h.hostid=i.hostid '. ' LEFT JOIN nodes n on n.nodeid='.DBid2nodeid('t.triggerid'). ' WHERE t.triggerid='.$elementid. - ' AND t.triggerid IN ('.$available_triggers.') '. + ' AND '.DBcondition('t.triggerid',$available_triggers). ' ORDER BY node_name,h.host,t.description')); if($trigger_info) |
