Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/plugin-ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
run: sudo apt-get update

- name: Install System Dependencies
run: sudo apt-get install -y apache2 snmp snmpd rrdtool fping libapache2-mod-php${{ matrix.php }}
run: sudo apt-get install -y apache2 snmp snmpd rrdtool fping libapache2-mod-php

- name: Start SNMPD Agent and Test
run: |
Expand Down
8 changes: 0 additions & 8 deletions includes/polling.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,6 @@ function thold_poller_output(&$rrd_update_array) {
return $rrd_update_array;
}

if (!function_exists('array_column')) {
function array_column($array, $column_name) {
return array_map(function ($element) use ($column_name) {
return $element[$column_name];
}, $array);
}
}

function thold_check_all_thresholds() {
global $config;

Expand Down
86 changes: 43 additions & 43 deletions thold_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,55 +493,55 @@ function thold_expression_boolean_rpn($operator, &$stack) {
array_push($stack, '0');
} else {
switch($operator) {
case 'LT':
if ($v1 < $v2) {
array_push($stack, '1');
} else {
array_push($stack, '0');
}
case 'LT':
if ($v1 < $v2) {
array_push($stack, '1');
} else {
array_push($stack, '0');
}

break;
case 'GT':
if ($v1 > $v2) {
array_push($stack, '1');
} else {
array_push($stack, '0');
}
break;
case 'GT':
if ($v1 > $v2) {
array_push($stack, '1');
} else {
array_push($stack, '0');
}

break;
case 'LE':
if ($v1 <= $v2) {
array_push($stack, '1');
} else {
array_push($stack, '0');
}
break;
case 'LE':
if ($v1 <= $v2) {
array_push($stack, '1');
} else {
array_push($stack, '0');
}

break;
case 'GE':
if ($v1 >= $v2) {
array_push($stack, '1');
} else {
array_push($stack, '0');
}
break;
case 'GE':
if ($v1 >= $v2) {
array_push($stack, '1');
} else {
array_push($stack, '0');
}

break;
case 'EQ':
if ($v1 == $v2) {
array_push($stack, '1');
} else {
array_push($stack, '0');
}
break;
case 'EQ':
if ($v1 == $v2) {
array_push($stack, '1');
} else {
array_push($stack, '0');
}

break;
case 'NE':
if ($v1 != $v2) {
array_push($stack, '1');
} else {
array_push($stack, '0');
}
break;
case 'NE':
if ($v1 != $v2) {
array_push($stack, '1');
} else {
array_push($stack, '0');
}

break;
}
break;
}
}
}
}
Expand Down
Loading