summaryrefslogtreecommitdiffstats
path: root/frontends/php/hosts.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-10-05 07:44:43 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-10-05 07:44:43 +0000
commitbf8fdb722259feff714daa58d33061fb844421a6 (patch)
tree0575a1452eb807b7b5bca849f0f45f60a1751f5d /frontends/php/hosts.php
parent91e65e1a77c5a4f500a70f115978388da7951122 (diff)
- fixed "Add items from template" functionality (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@2106 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/hosts.php')
-rw-r--r--frontends/php/hosts.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/frontends/php/hosts.php b/frontends/php/hosts.php
index 79eb2055..7bbbeb16 100644
--- a/frontends/php/hosts.php
+++ b/frontends/php/hosts.php
@@ -43,6 +43,18 @@
<?php
if(isset($_GET["register"]))
{
+ if($_GET["register"]=="add items from template")
+ {
+ if(isset($_GET["host_templateid"])&&($_GET["host_templateid"]!=0))
+ {
+ $result=sync_items_with_template_host($_GET["hostid"],$_GET["host_templateid"]);
+ show_messages(TRUE,S_ITEMS_ADDED,S_CANNOT_ADD_ITEMS);
+ }
+ else
+ {
+ show_messages(FALSE,"",S_SELECT_HOST_TEMPLATE_FIRST);
+ }
+ }
if($_GET["register"]=="add linkage")
{
$items=0;
@@ -54,7 +66,7 @@
if(isset($_GET["triggers_update"])) $triggers=$triggers|2;
if(isset($_GET["triggers_delete"])) $triggers=$triggers|4;
$actions=0;
- if(isset($_GET["actions_add"])) $actions=$actions|1;
+ if(isset($_GET["actions_add"])) $actions=$actions|1;
if(isset($_GET["actions_update"])) $actions=$actions|2;
if(isset($_GET["actions_delete"])) $actions=$actions|4;
$graphs=0;