summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/forms.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/forms.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/forms.inc.php')
-rw-r--r--frontends/php/include/forms.inc.php36
1 files changed, 18 insertions, 18 deletions
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php
index 6306ad2e..a6794f1a 100644
--- a/frontends/php/include/forms.inc.php
+++ b/frontends/php/include/forms.inc.php
@@ -2213,7 +2213,7 @@
{
array_push($target_list,array(
new CCheckBox('copy_targetid[]',
- in_array($target['target_id'], $copy_targetid),
+ uint_in_array($target['target_id'], $copy_targetid),
null,
$target['target_id']),
SPACE,
@@ -2308,7 +2308,7 @@
" WHERE t.triggerid=d.triggerid_up AND d.triggerid_down=".$_REQUEST["triggerid"]);
while($trig=DBfetch($trigs))
{
- if(in_array($trig["triggerid"],$dependences)) continue;
+ if(uint_in_array($trig["triggerid"],$dependences)) continue;
array_push($dependences,$trig["triggerid"]);
}
}
@@ -2906,7 +2906,7 @@ include_once 'include/discovery.inc.php';
'operator' => $condition_data['operator'],
'value' => $condition_data['value']);
- if(in_array($condition_data, $conditions)) continue;
+ if(str_in_array($condition_data, $conditions)) continue;
array_push($conditions, $condition_data);
}
unset($condition_data, $db_conditions);
@@ -2924,7 +2924,7 @@ include_once 'include/discovery.inc.php';
'shortdata' => $operation_data['shortdata'],
'longdata' => $operation_data['longdata']);
- if(in_array($operation_data, $operations)) continue;
+ if(str_in_array($operation_data, $operations)) continue;
array_push($operations, $operation_data);
}
unset($db_operations, $operation_data);
@@ -2948,7 +2948,7 @@ include_once 'include/discovery.inc.php';
if( !isset($new_condition['operator'])) $new_condition['operator'] = CONDITION_OPERATOR_LIKE;
if( !isset($new_condition['value']) ) $new_condition['value'] = '';
- if( !in_array($new_condition['type'], $allowed_conditions) )
+ if( !str_in_array($new_condition['type'], $allowed_conditions) )
$new_condition['type'] = $allowed_conditions[0];
/* init new_operation variable */
@@ -2982,7 +2982,7 @@ include_once 'include/discovery.inc.php';
if( !isset($val['operator']) ) $val['operator'] = 0;
if( !isset($val['value']) ) $val['value'] = 0;
- if( !in_array($val["type"], $allowed_conditions) ) continue;
+ if( !str_in_array($val["type"], $allowed_conditions) ) continue;
$label = chr(ord('A') + $i);
$cond_el->AddRow(array('('.$label.')',array(
@@ -3173,7 +3173,7 @@ include_once 'include/discovery.inc.php';
$oper_el = new CTable(S_NO_OPERATIONS_DEFINED);
foreach($operations as $id => $val)
{
- if( !in_array($val['operationtype'], $allowed_operations) ) continue;
+ if( !str_in_array($val['operationtype'], $allowed_operations) ) continue;
$oper_details = new CSpan(get_operation_desc(SHORT_DESCRITION, $val));
$oper_details->SetHint(nl2br(get_operation_desc(LONG_DESCRITION, $val)));
@@ -3806,7 +3806,7 @@ include_once 'include/discovery.inc.php';
$form->AddRow(S_SHOW_LINES, new CNumericBox('elements',$elements,2));
$form->AddVar('resourceid',0);
}
- elseif(in_array($resourcetype,array(SCREEN_RESOURCE_TRIGGERS_OVERVIEW,SCREEN_RESOURCE_DATA_OVERVIEW))){
+ elseif(uint_in_array($resourcetype,array(SCREEN_RESOURCE_TRIGGERS_OVERVIEW,SCREEN_RESOURCE_DATA_OVERVIEW))){
// Overiews
$caption = '';
$id=0;
@@ -3909,14 +3909,14 @@ include_once 'include/discovery.inc.php';
$form->AddVar("resourceid",0);
}
- if(in_array($resourcetype,array(SCREEN_RESOURCE_HOSTS_INFO,SCREEN_RESOURCE_TRIGGERS_INFO)))
+ if(uint_in_array($resourcetype,array(SCREEN_RESOURCE_HOSTS_INFO,SCREEN_RESOURCE_TRIGGERS_INFO)))
{
$cmbStyle = new CComboBox("style", $style);
$cmbStyle->AddItem(STYLE_HORISONTAL, S_HORISONTAL);
$cmbStyle->AddItem(STYLE_VERTICAL, S_VERTICAL);
$form->AddRow(S_STYLE, $cmbStyle);
}
- else if(in_array($resourcetype,array(SCREEN_RESOURCE_TRIGGERS_OVERVIEW,SCREEN_RESOURCE_DATA_OVERVIEW)))
+ else if(uint_in_array($resourcetype,array(SCREEN_RESOURCE_TRIGGERS_OVERVIEW,SCREEN_RESOURCE_DATA_OVERVIEW)))
{
$cmbStyle = new CComboBox('style', $style);
$cmbStyle->AddItem(STYLE_LEFT, S_LEFT);
@@ -3935,7 +3935,7 @@ include_once 'include/discovery.inc.php';
$form->AddVar("style", 0);
}
- if(in_array($resourcetype,array(SCREEN_RESOURCE_URL)))
+ if(uint_in_array($resourcetype,array(SCREEN_RESOURCE_URL)))
{
$form->AddRow(S_URL, new CTextBox("url",$url,60));
}
@@ -3944,7 +3944,7 @@ include_once 'include/discovery.inc.php';
$form->AddVar("url", "");
}
- if(in_array($resourcetype,array(SCREEN_RESOURCE_GRAPH,SCREEN_RESOURCE_SIMPLE_GRAPH,SCREEN_RESOURCE_CLOCK,SCREEN_RESOURCE_URL)))
+ if(uint_in_array($resourcetype,array(SCREEN_RESOURCE_GRAPH,SCREEN_RESOURCE_SIMPLE_GRAPH,SCREEN_RESOURCE_CLOCK,SCREEN_RESOURCE_URL)))
{
$form->AddRow(S_WIDTH, new CNumericBox("width",$width,5));
$form->AddRow(S_HEIGHT, new CNumericBox("height",$height,5));
@@ -3955,7 +3955,7 @@ include_once 'include/discovery.inc.php';
$form->AddVar("height", 0);
}
- if(in_array($resourcetype,array(SCREEN_RESOURCE_GRAPH,SCREEN_RESOURCE_SIMPLE_GRAPH,SCREEN_RESOURCE_MAP,
+ if(uint_in_array($resourcetype,array(SCREEN_RESOURCE_GRAPH,SCREEN_RESOURCE_SIMPLE_GRAPH,SCREEN_RESOURCE_MAP,
SCREEN_RESOURCE_CLOCK,SCREEN_RESOURCE_URL)))
{
$cmbHalign = new CComboBox("halign",$halign);
@@ -3979,7 +3979,7 @@ include_once 'include/discovery.inc.php';
$form->AddRow(S_ROW_SPAN, new CNumericBox("rowspan",$rowspan,2));
// dynamic AddOn
- if(in_array($resourcetype,array(SCREEN_RESOURCE_GRAPH,SCREEN_RESOURCE_SIMPLE_GRAPH,SCREEN_RESOURCE_PLAIN_TEXT))){
+ if(uint_in_array($resourcetype,array(SCREEN_RESOURCE_GRAPH,SCREEN_RESOURCE_SIMPLE_GRAPH,SCREEN_RESOURCE_PLAIN_TEXT))){
$form->AddRow(S_DYNAMIC_ITEM, new CCheckBox("dynamic",$dynamic,null,1));
}
@@ -4031,7 +4031,7 @@ include_once 'include/discovery.inc.php';
array(
new CCheckBox(
"severity[]",
- in_array($i,$severity)?'yes':'no',
+ str_in_array($i,$severity)?'yes':'no',
null, /* action */
$i), /* value */
get_severity_description($i)
@@ -4199,7 +4199,7 @@ include_once 'include/discovery.inc.php';
get_accessible_groups_by_user($USER_DETAILS,PERM_READ_LIST,null,null,get_current_nodeid()).
") ");
while($db_group=DBfetch($db_groups)){
- if(in_array($db_group["groupid"],$groups)) continue;
+ if(uint_in_array($db_group["groupid"],$groups)) continue;
array_push($groups, $db_group["groupid"]);
}
// read profile
@@ -4253,7 +4253,7 @@ include_once 'include/discovery.inc.php';
array_push($frm_row,
array(
new CCheckBox("groups[]",
- in_array($db_group["groupid"],$groups) ? 'yes' : 'no',
+ uint_in_array($db_group["groupid"],$groups) ? 'yes' : 'no',
null,
$db_group["groupid"]
),
@@ -4424,7 +4424,7 @@ include_once 'include/discovery.inc.php';
" order by host");
while($db_host=DBfetch($db_hosts))
{
- if(in_array($db_host["hostid"],$hosts)) continue;
+ if(uint_in_array($db_host["hostid"],$hosts)) continue;
array_push($hosts, $db_host["hostid"]);
}
}