diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-07-10 08:04:38 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-07-10 08:04:38 +0000 |
| commit | da89a85a0eeed1b50bc3b5e38b3392e852fa0f72 (patch) | |
| tree | 26daa648960d802c28067bf1a766cdce0c8c79e2 /frontends/php/items.php | |
| parent | 616715ae783f353d07b1cfa1f48a7631c165a2f8 (diff) | |
| download | zabbix-da89a85a0eeed1b50bc3b5e38b3392e852fa0f72.tar.gz zabbix-da89a85a0eeed1b50bc3b5e38b3392e852fa0f72.tar.xz zabbix-da89a85a0eeed1b50bc3b5e38b3392e852fa0f72.zip | |
- [DEV-144] fixes to trigger mass-update (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5821 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/items.php')
| -rw-r--r-- | frontends/php/items.php | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/frontends/php/items.php b/frontends/php/items.php index 8dd886a2..a41581df 100644 --- a/frontends/php/items.php +++ b/frontends/php/items.php @@ -645,7 +645,6 @@ include_once "include/page_header.php"; } ?> <?php - $form = new CForm(); $form->SetMethod('get'); $form->SetName('hdrform'); @@ -885,17 +884,16 @@ include_once "include/page_header.php"; $from_tables['i'] = 'items i'; /* NOTE: must be added as last element to use left join */ - $db_items = DBselect('SELECT DISTINCT th.host as template_host,th.hostid as template_hostid, h.host, i.* '. - ' FROM '.implode(',', $from_tables). - ' LEFT JOIN items ti ON i.templateid=ti.itemid '. - ' LEFT JOIN hosts th ON ti.hostid=th.hostid '. - ' WHERE '.implode(' and ', $where_case). - order_by('h.host,i.description,i.key_,i.delay,i.history,i.trends,i.type,i.status','i.itemid')); - + $sql = 'SELECT DISTINCT th.host as template_host,th.hostid as template_hostid, h.host, i.* '. + ' FROM '.implode(',', $from_tables). + ' LEFT JOIN items ti ON i.templateid=ti.itemid '. + ' LEFT JOIN hosts th ON ti.hostid=th.hostid '. + ' WHERE '.implode(' and ', $where_case). + order_by('h.host,i.description,i.key_,i.delay,i.history,i.trends,i.type,i.status','i.itemid'); + $db_items = DBselect($sql); + while($db_item = DBfetch($db_items)){ - $description = array(); - $item_description = item_description($db_item["description"],$db_item["key_"]); if(isset($_REQUEST['filter_description']) && !zbx_stristr($item_description, $_REQUEST['filter_description']) ) continue; @@ -908,7 +906,7 @@ include_once "include/page_header.php"; 'unknown'), ":"); } - + array_push($description, new CLink( item_description($db_item["description"],$db_item["key_"]), "?form=update&itemid=". @@ -926,7 +924,7 @@ include_once "include/page_header.php"; else{ $error=new CCol($db_item["error"],"on"); } - + $applications = $show_applications ? implode(', ', get_applications_by_itemid($db_item["itemid"], 'name')) : null; if(!is_null($applications) && empty($applications)) $applications = ' - '; @@ -963,7 +961,6 @@ include_once "include/page_header.php"; $form->AddItem($table); $form->Show(); - } if(isset($_REQUEST["form"]) && (str_in_array($_REQUEST["form"],array(S_CREATE_ITEM,"update","clone")) || |
