summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/items.inc.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/include/items.inc.php
parent6db9d7bcf88b79ab279dd2b5dc929fabb1a23f1f (diff)
- [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/include/items.inc.php')
-rw-r--r--frontends/php/include/items.inc.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/frontends/php/include/items.inc.php b/frontends/php/include/items.inc.php
index 5552f4a5..8a022791 100644
--- a/frontends/php/include/items.inc.php
+++ b/frontends/php/include/items.inc.php
@@ -834,17 +834,19 @@
*/
function get_items_data_overview($groupid,$view_style=null){
global $USER_DETAILS;
- $available_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY);
+ $available_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY,PERM_RES_IDS_ARRAY);
if(is_null($view_style)) $view_style = get_profile('web.overview.view.style',STYLE_TOP);
$table = new CTableInfo(S_NO_ITEMS_DEFINED);
if($groupid > 0){
- $group_where = ",hosts_groups hg where hg.groupid=$groupid and hg.hostid=h.hostid and";
+ $group_where = ',hosts_groups hg '.
+ ' WHERE hg.groupid='.$groupid.
+ ' AND hg.hostid=h.hostid AND ';
}
else {
- $group_where = " where";
+ $group_where = ' WHERE ';
}
COpt::profiling_start('prepare data');
@@ -853,7 +855,8 @@ COpt::profiling_start('prepare data');
' from hosts h,items i '.
' left join functions f on f.itemid=i.itemid '.
' left join triggers t on t.triggerid=f.triggerid '.
- $group_where.' h.hostid in ('.$available_hosts.') '.
+ $group_where.
+ DBcondition('h.hostid',$available_hosts).
' and h.status='.HOST_STATUS_MONITORED.
' and h.hostid=i.hostid '.
' and i.status='.ITEM_STATUS_ACTIVE.