summaryrefslogtreecommitdiffstats
path: root/frontends/php/chart.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-07-23 09:37:47 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-07-23 09:37:47 +0000
commit5c3768ceaa3080321c3bf6481640fcdd380d0025 (patch)
tree172b94421c008b166a1106c5c42f983c2b8fe5b3 /frontends/php/chart.php
parent6db9d7bcf88b79ab279dd2b5dc929fabb1a23f1f (diff)
downloadzabbix-5c3768ceaa3080321c3bf6481640fcdd380d0025.tar.gz
zabbix-5c3768ceaa3080321c3bf6481640fcdd380d0025.tar.xz
zabbix-5c3768ceaa3080321c3bf6481640fcdd380d0025.zip
- [DEV-192] added filter to Status of triggers (Artem)
- [DEV-191] monitoring screens inline update preparation (Artem) - [DEV-192] added severity filter in status of triggers (Artem) - [DEV-137] sql fixes for oracle (Artem) - [ZBX-396] fixed error maps message (Artem) - [ZBX-394] fixed showing hosts without group in status of triggers (Artem) - [DEV-137] small fixes (Artem) git-svn-id: svn://svn.zabbix.com/trunk@5841 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/chart.php')
-rw-r--r--frontends/php/chart.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/frontends/php/chart.php b/frontends/php/chart.php
index 9d9813e7..35b8b0a9 100644
--- a/frontends/php/chart.php
+++ b/frontends/php/chart.php
@@ -44,15 +44,16 @@ include_once "include/page_header.php";
check_fields($fields);
?>
<?php
- if(! (DBfetch(DBselect('select itemid from items where itemid='.$_REQUEST['itemid']))) )
- {
+ if(!DBfetch(DBselect('select itemid from items where itemid='.$_REQUEST['itemid']))){
show_error_message(S_NO_ITEM_DEFINED);
// show_message(S_NO_ITEM_DEFINED);
}
- if(! ($db_data = DBfetch(DBselect('SELECT i.itemid from items i '.
- ' WHERE i.hostid IN ('.get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY).') '.
- ' AND i.itemid='.$_REQUEST['itemid']))))
+ $available_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY,PERM_RES_IDS_ARRAY);
+
+ if(!$db_data = DBfetch(DBselect('SELECT i.itemid from items i '.
+ ' WHERE '.DBcondition('i.hostid',$available_hosts).
+ ' AND i.itemid='.$_REQUEST['itemid'])))
{
access_deny();
}