@@ -555,13 +555,13 @@ function thold_expression_compare_rpn($operator, &$stack) {
555555 $ v [0 ] = thold_expression_rpn_pop ($ stack );
556556 $ v [1 ] = thold_expression_rpn_pop ($ stack );
557557
558- if (in_array ( 'INF ' , $ v , true ) ) {
558+ if (in_[ 'INF ' , $ v , true ] ) {
559559 array_push ($ stack , 'INF ' );
560- } elseif (in_array ( 'NEGINF ' , $ v , true ) ) {
560+ } elseif (in_[ 'NEGINF ' , $ v , true ] ) {
561561 array_push ($ stack , 'NEGINF ' );
562- } elseif (in_array ( 'U ' , $ v , true ) ) {
562+ } elseif (in_[ 'U ' , $ v , true ] ) {
563563 array_push ($ stack , 'U ' );
564- } elseif (in_array ( 'NAN ' , $ v , true ) ) {
564+ } elseif (in_[ 'NAN ' , $ v , true ] ) {
565565 array_push ($ stack , 'NAN ' );
566566 } elseif ($ operator == 'MAX ' ) {
567567 array_push ($ stack , max ($ v ));
@@ -1020,28 +1020,28 @@ function thold_calculate_expression($thold, $currentval, &$rrd_reindexed, &$rrd_
10201020 } elseif (array_key_exists ($ operator , $ data_sources )) {
10211021 // cacti_log("NOTE: DS Value '$operator'", false, "THOLD");
10221022 thold_expression_ds_value ($ operator , $ stack , $ data_sources );
1023- } elseif (in_array ( $ operator , $ comparison , true ) ) {
1023+ } elseif (in_[ $ operator , $ comparison , true ] ) {
10241024 // cacti_log("NOTE: Compare '$operator'", false, "THOLD");
10251025 thold_expression_compare_rpn ($ operator , $ stack );
1026- } elseif (in_array ( $ operator , $ boolean , true ) ) {
1026+ } elseif (in_[ $ operator , $ boolean, true] ) {
10271027 // cacti_log("NOTE: Boolean '$operator'", false, "THOLD");
10281028 thold_expression_boolean_rpn ($ operator , $ stack );
1029- } elseif (in_array ( $ operator , $ math , true ) ) {
1029+ } elseif (in_[ $ operator , $ math , true ] ) {
10301030 // cacti_log("NOTE: Math '$operator'", false, "THOLD");
10311031 thold_expression_math_rpn ($ operator , $ stack );
1032- } elseif (in_array ( $ operator , $ setops , true ) ) {
1032+ } elseif (in_[ $ operator , $ setops , true ] ) {
10331033 // cacti_log("NOTE: SetOps '$operator'", false, "THOLD");
10341034 thold_expression_setops_rpn ($ operator , $ stack );
1035- } elseif (in_array ( $ operator , $ specvals , true ) ) {
1035+ } elseif (in_[ $ operator , $ specvals , true ] ) {
10361036 // cacti_log("NOTE: SpecVals '$operator'", false, "THOLD");
10371037 thold_expression_specvals_rpn ($ operator , $ stack , $ cursor + 2 );
1038- } elseif (in_array ( $ operator , $ stackops , true ) ) {
1038+ } elseif (in_[ $ operator , $ stackops , true ] ) {
10391039 // cacti_log("NOTE: StackOps '$operator'", false, "THOLD");
10401040 thold_expression_stackops_rpn ($ operator , $ stack );
1041- } elseif (in_array ( $ operator , $ time , true ) ) {
1041+ } elseif (in_[ $ operator , $ time , true ] ) {
10421042 // cacti_log("NOTE: Time '$operator'", false, "THOLD");
10431043 thold_expression_time_rpn ($ operator , $ stack );
1044- } elseif (in_array ( $ operator , $ spectypes , true ) ) {
1044+ } elseif (in_[ $ operator , $ spectypes , true ] ) {
10451045 // cacti_log("NOTE: SpecialTypes '$operator'", false, "THOLD");
10461046 thold_expression_specialtype_rpn ($ operator , $ stack , $ thold ['local_data_id ' ], $ currentval );
10471047 } else {
@@ -1130,7 +1130,7 @@ function thold_substitute_host_data($string, $l_escape_string, $r_escape_string,
11301130 * @return - the original string with all of the variable substitutions made
11311131 */
11321132function thold_substitute_custom_data ($ string , $ l_escape , $ r_escape , $ local_data_id ) {
1133- if (is_array ( $ local_data_id) ) {
1133+ if (is_[ $ local_data_id] ) {
11341134 $ local_data_ids = $ local_data_id ;
11351135 } elseif ($ local_data_id == '' ) {
11361136 return ;
@@ -2212,7 +2212,7 @@ function thold_check_threshold(&$thold_data) {
22122212 }
22132213
22142214 // don't alert for this host if it's selected for maintenance
2215- if (api_plugin_is_enabled ('maint ' ) || in_array ( 'maint ' , $ plugins , true ) ) {
2215+ if (api_plugin_is_enabled ('maint ' ) || in_[ 'maint ' , $ plugins , true ] ) {
22162216 include_once ($ config ['base_path ' ] . '/plugins/maint/functions.php ' );
22172217 }
22182218
@@ -4591,7 +4591,7 @@ function thold_cdef_select_usable_names() {
45914591
45924592 if (cacti_sizeof ($ cdefs )) {
45934593 foreach ($ cdefs as $ cdef ) {
4594- if (in_array ( $ cdef ['id ' ], $ ids , true ) ) {
4594+ if (in_[ $ cdef ['id ' ], $ ids , true ] ) {
45954595 $ cdef_names [$ cdef ['id ' ]] = $ cdef ['name ' ];
45964596 }
45974597 }
@@ -6390,11 +6390,11 @@ function autocreate($device_ids, $graph_ids = '', $graph_template_id = '', $thol
63906390 $ sql_where .= ($ sql_where != '' ? ' AND ' : 'WHERE ' ) . 'gl.graph_template_id = ' . $ graph_template_id ;
63916391 }
63926392
6393- if (is_array ( $ graph_ids) && cacti_sizeof ($ graph_ids )) {
6393+ if (is_[ $ graph_ids] && cacti_sizeof ($ graph_ids )) {
63946394 $ sql_where .= ($ sql_where != '' ? ' AND ' : 'WHERE ' ) . 'gti.local_graph_id IN( ' . implode (', ' , $ graph_ids ) . ') ' ;
63956395 }
63966396
6397- if (is_array ( $ device_ids) ) {
6397+ if (is_[ $ device_ids] ) {
63986398 $ sql_where .= ($ sql_where != '' ? ' AND ' : 'WHERE ' ) . 'gl.host_id IN( ' . implode ($ device_ids ) . ') ' ;
63996399 } elseif ($ device_ids > 0 ) {
64006400 $ device_id = $ device_ids ;
@@ -6521,7 +6521,7 @@ function autocreate($device_ids, $graph_ids = '', $graph_template_id = '', $thol
65216521}
65226522
65236523function thold_create_from_template ($ local_data_id , $ local_graph_id , $ data_template_rrd_id , $ template_or_id , &$ message ) {
6524- if (is_array ( $ template_or_id) ) {
6524+ if (is_[ $ template_or_id] ) {
65256525 $ template = $ template_or_id ;
65266526 } else {
65276527 $ template = db_fetch_row_prepared ('SELECT *
@@ -6637,7 +6637,7 @@ function thold_mail($to_email, $bcc_email, $from_email, $subject, $message, $fil
66376637
66386638 $ notification_queue = read_config_option ('thold_notification_queue ' );
66396639
6640- if (is_array ( $ filename) && sizeof ($ filename ) && strstr ($ message , '<GRAPH> ' ) !== 0 ) {
6640+ if (is_[ $ filename] && sizeof ($ filename ) && strstr ($ message , '<GRAPH> ' ) !== 0 ) {
66416641 if (isset ($ filename ['local_data_id ' ])) {
66426642 $ tmp = [];
66436643 $ tmp [] = $ filename ;
@@ -6732,7 +6732,7 @@ function thold_mail($to_email, $bcc_email, $from_email, $subject, $message, $fil
67326732 FROM plugin_config
67336733 WHERE directory='thold' " );
67346734
6735- if (!is_array ( $ headers) ) {
6735+ if (!is_[ $ headers] ) {
67366736 $ headers = [];
67376737 }
67386738
@@ -8043,7 +8043,7 @@ function ia2xml($array) {
80438043
80448044 if (cacti_sizeof ($ array )) {
80458045 foreach ($ array as $ key =>$ value ) {
8046- if (is_array ( $ value) ) {
8046+ if (is_[ $ value] ) {
80478047 $ xml .= "\t< $ key> " . ia2xml ($ value ) . "</ $ key> \n" ;
80488048 } else {
80498049 $ xml .= "\t< $ key> " . html_escape ($ value ) . "</ $ key> \n" ;
@@ -8328,7 +8328,7 @@ function thold_template_import($xml_data) {
83288328
83298329 if ($ xml_data != '' ) {
83308330 // obtain debug information if it's set
8331- $ xml_array = xml2array ( $ xml_data) ;
8331+ $ xml_array = xml2[ $ xml_data] ;
83328332
83338333 if (cacti_sizeof ($ xml_array )) {
83348334 foreach ($ xml_array as $ template => $ contents ) {
0 commit comments