summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/hosts.inc.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-01-16 14:28:28 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-01-16 14:28:28 +0000
commit819114c84816786fa5bd16c933e0ea8d6d09f9d9 (patch)
tree6f5188b3404ffafd72c5aaee61386c285f692771 /frontends/php/include/hosts.inc.php
parent32e5c61ed67fadf2cf7670a1f5bfa55bf4831c9c (diff)
downloadzabbix-819114c84816786fa5bd16c933e0ea8d6d09f9d9.tar.gz
zabbix-819114c84816786fa5bd16c933e0ea8d6d09f9d9.tar.xz
zabbix-819114c84816786fa5bd16c933e0ea8d6d09f9d9.zip
- [ZBX-253] fixes problem in frontend with long int values (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5259 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/hosts.inc.php')
-rw-r--r--frontends/php/include/hosts.inc.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/frontends/php/include/hosts.inc.php b/frontends/php/include/hosts.inc.php
index fd6c30c9..0c8b47d8 100644
--- a/frontends/php/include/hosts.inc.php
+++ b/frontends/php/include/hosts.inc.php
@@ -603,7 +603,7 @@ require_once "include/items.inc.php";
}
}
- if(in_array("always_select_first_host",$options) && $_REQUEST["hostid"] == 0 && $_REQUEST["groupid"] != 0)
+ if(str_in_array("always_select_first_host",$options) && $_REQUEST["hostid"] == 0 && $_REQUEST["groupid"] != 0)
$_REQUEST["hostid"] = -1;
$result = get_correct_group_and_host($_REQUEST["groupid"],$_REQUEST["hostid"], $perm, $options);
@@ -638,22 +638,22 @@ require_once "include/items.inc.php";
$first_hostid_in_group = 0;
- $allow_all_hosts = (in_array("allow_all_hosts",$options)) ? 1 : 0;
- $always_select_first_host = in_array("always_select_first_host",$options) ? 1 : 0;
- $only_current_node = in_array("only_current_node",$options) ? 1 : 0;
+ $allow_all_hosts = (str_in_array("allow_all_hosts",$options)) ? 1 : 0;
+ $always_select_first_host = str_in_array("always_select_first_host",$options) ? 1 : 0;
+ $only_current_node = str_in_array("only_current_node",$options) ? 1 : 0;
- if(in_array("monitored_hosts",$options))
+ if(str_in_array("monitored_hosts",$options))
$with_host_status = " and h.status=".HOST_STATUS_MONITORED;
- elseif(in_array('real_hosts',$options))
+ elseif(str_in_array('real_hosts',$options))
$with_host_status = " and h.status<>".HOST_STATUS_TEMPLATE;
- elseif(in_array('templated_hosts',$options))
+ elseif(str_in_array('templated_hosts',$options))
$with_host_status = " and h.status=".HOST_STATUS_TEMPLATE;
else
$with_host_status = "";
- if(in_array("with_monitored_items",$options)){
+ if(str_in_array("with_monitored_items",$options)){
$item_table = ",items i"; $with_items = " and h.hostid=i.hostid and i.status=".ITEM_STATUS_ACTIVE;
- }else if(in_array("with_items",$options)){
+ }else if(str_in_array("with_items",$options)){
$item_table = ",items i"; $with_items = " and h.hostid=i.hostid";
} else {
$item_table = "";
@@ -791,7 +791,7 @@ require_once "include/items.inc.php";
}
}
- if(in_array("always_select_first_host",$options) && $_REQUEST["hostid"] == 0 && $_REQUEST["groupid"] != 0)
+ if(uint_in_array("always_select_first_host",$options) && $_REQUEST["hostid"] == 0 && $_REQUEST["groupid"] != 0)
$_REQUEST["hostid"] = -1;
$result = get_correct_group_and_host($_REQUEST["groupid"],$_REQUEST["hostid"], $perm, $options);
@@ -1081,7 +1081,7 @@ require_once "include/items.inc.php";
unset($skip);
if( ($tmp_app_data = get_application_by_applicationid($db_app["templateid"])) )
{
- if( !in_array($tmp_app_data["hostid"], $templateid) )
+ if( !uint_in_array($tmp_app_data["hostid"], $templateid) )
{
$skip = true;
break;