diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-03-25 10:37:56 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-03-25 10:37:56 +0000 |
| commit | 1b9900bb3e3059518fbed4f986ce83bb2d3102a2 (patch) | |
| tree | e5589be98d6b04b624bdfdd3a82899b06642e19c /frontends/php/include | |
| parent | 0a6110e779f37aaf9793e10c0778f715de2c6caf (diff) | |
| download | zabbix-1b9900bb3e3059518fbed4f986ce83bb2d3102a2.tar.gz zabbix-1b9900bb3e3059518fbed4f986ce83bb2d3102a2.tar.xz zabbix-1b9900bb3e3059518fbed4f986ce83bb2d3102a2.zip | |
- fixed error on items copy to host (Artem)
- fixed html code view in history (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5516 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
| -rw-r--r-- | frontends/php/include/items.inc.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/frontends/php/include/items.inc.php b/frontends/php/include/items.inc.php index dc0c5394..b78e3e9e 100644 --- a/frontends/php/include/items.inc.php +++ b/frontends/php/include/items.inc.php @@ -612,6 +612,7 @@ $db_tmp_item["logtimefmt"], $db_tmp_item["valuemapid"], $db_tmp_item["delay_flex"], + $db_tmp_item["params"], get_same_applications_for_host(get_applications_by_itemid($db_tmp_item["itemid"]),$hostid), $copy_mode ? 0 : $db_tmp_item["itemid"]); } @@ -647,7 +648,6 @@ while($db_tmp_item = DBfetch($db_tmp_items)) { - $apps = get_same_applications_for_host(get_applications_by_itemid($db_tmp_item["itemid"]),$hostid); add_item( $db_tmp_item["description"], $db_tmp_item["key_"], @@ -674,7 +674,7 @@ $db_tmp_item["valuemapid"], $db_tmp_item["delay_flex"], $db_tmp_item["params"], - $apps, + get_same_applications_for_host(get_applications_by_itemid($db_tmp_item["itemid"]),$hostid), $copy_mode ? 0 : $db_tmp_item["itemid"]); } } @@ -1048,19 +1048,17 @@ COpt::profiling_stop('prepare table'); * Comments: !!! Don't forget sync code with C !!! * * * ******************************************************************************/ - function get_same_applications_for_host($applications, $hostid) - { + function get_same_applications_for_host($applications, $hostid){ $child_applications = array(); - foreach($applications as $appid) - { + foreach($applications as $appid){ $db_apps = DBselect("select a1.applicationid from applications a1, applications a2". " where a1.name=a2.name and a1.hostid=".$hostid." and a2.applicationid=".$appid); $db_app = DBfetch($db_apps); if(!$db_app) continue; array_push($child_applications,$db_app["applicationid"]); } - return $child_applications; + return $child_applications; } /****************************************************************************** |
