summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-04-13 08:44:25 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-04-13 08:44:25 +0000
commit234440bb34c6b4ee26810917abe59c70a1be22c3 (patch)
treea4ee846ebcd49b27984ea8cd83bbbfb0de1474d3 /frontends/php/include
parent3296b45b93955443d861fbb38983bc12c5066494 (diff)
downloadzabbix-234440bb34c6b4ee26810917abe59c70a1be22c3.tar.gz
zabbix-234440bb34c6b4ee26810917abe59c70a1be22c3.tar.xz
zabbix-234440bb34c6b4ee26810917abe59c70a1be22c3.zip
- added independent filter by group and host for trigger status (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2737 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/hosts.inc.php21
1 files changed, 13 insertions, 8 deletions
diff --git a/frontends/php/include/hosts.inc.php b/frontends/php/include/hosts.inc.php
index 22106867..b45f3a32 100644
--- a/frontends/php/include/hosts.inc.php
+++ b/frontends/php/include/hosts.inc.php
@@ -512,10 +512,13 @@
return $result;
}
- function validate_group_with_host($right, $options = array())
+ function validate_group_with_host($right, $options = array(),$group_var=NULL,$host_var=NULL)
{
- $_REQUEST["groupid"] = get_request("groupid",get_profile("web.latest.groupid",0));
- $_REQUEST["hostid"] = get_request("hostid",get_profile("web.latest.hostid",
+ if(is_null($group_var)) $group_var = "web.latest.groupid";
+ if(is_null($host_var)) $host_var = "web.latest.hostid";
+
+ $_REQUEST["groupid"] = get_request("groupid",get_profile($group_var,0));
+ $_REQUEST["hostid"] = get_request("hostid",get_profile($host_var,
(in_array("always_select_first_host",$options)) ? -1 : 0));
$result = get_correct_group_and_host($_REQUEST["groupid"],$_REQUEST["hostid"], $right, $options);
@@ -523,18 +526,20 @@
$_REQUEST["groupid"] = $result["groupid"];
$_REQUEST["hostid"] = $result["hostid"];
- update_profile("web.latest.hostid",$_REQUEST["hostid"]);
- update_profile("web.latest.groupid",$_REQUEST["groupid"]);
+ update_profile($host_var,$_REQUEST["hostid"]);
+ update_profile($group_var,$_REQUEST["groupid"]);
}
- function validate_group($right, $options = array())
+ function validate_group($right, $options = array(),$group_var=NULL)
{
- $_REQUEST["groupid"] = get_request("groupid",get_profile("web.latest.groupid",0));
+ if(is_null($group_var)) $group_var = "web.latest.groupid";
+
+ $_REQUEST["groupid"] = get_request("groupid",get_profile($group_var,0));
$result = get_correct_group_and_host($_REQUEST["groupid"],NULL,$right,$options);
$_REQUEST["groupid"] = $result["groupid"];
- update_profile("web.latest.groupid",$_REQUEST["groupid"]);
+ update_profile($group_var,$_REQUEST["groupid"]);
}
?>