summaryrefslogtreecommitdiffstats
path: root/frontends/php/items.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-08-20 14:46:11 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-08-20 14:46:11 +0000
commit469d17e7d448ec1833abb72add88d1d1f61c4a06 (patch)
tree4a21e42405a82385c87981d5f2199e388a964272 /frontends/php/items.php
parent155fa1457186f7ffa453ba7bf68ae0c22387746b (diff)
downloadzabbix-master.tar.gz
zabbix-master.tar.xz
zabbix-master.zip
- [DEV-199] performance improvements of js scripts in hosts screen (Artem)HEADmaster
- [DEV-137] many small fixes (Artem) git-svn-id: svn://svn.zabbix.com/trunk@5932 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/items.php')
-rw-r--r--frontends/php/items.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/frontends/php/items.php b/frontends/php/items.php
index 731cb258..db101da2 100644
--- a/frontends/php/items.php
+++ b/frontends/php/items.php
@@ -447,16 +447,12 @@ include_once "include/page_header.php";
}
else{ /* groups */
$hosts_ids = array();
- $group_ids = "";
- foreach($_REQUEST['copy_targetid'] as $group_id){
- $group_ids .= $group_id.',';
- }
- $group_ids = trim($group_ids,',');
+ $group_ids = $_REQUEST['copy_targetid'];
- $db_hosts = DBselect('select distinct h.hostid '.
- ' from hosts h, hosts_groups hg'.
- ' where h.hostid=hg.hostid '.
- ' and hg.groupid in ('.$group_ids.')');
+ $db_hosts = DBselect('SELECT DISTINCT h.hostid '.
+ ' FROM hosts h, hosts_groups hg'.
+ ' WHERE h.hostid=hg.hostid '.
+ ' AND '.DBcondition('hg.groupid',$group_ids));
while($db_host = DBfetch($db_hosts)){
array_push($hosts_ids, $db_host['hostid']);
}