Skip to content

Commit

Permalink
More QA on 54eb643
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWitness committed Apr 6, 2024
1 parent 2b67098 commit 0d85e77
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions host.php
Expand Up @@ -1406,11 +1406,16 @@ function get_device_records(&$total_rows, $rows) {
} elseif ($host_where_status == '-3') {
$sql_where .= ($sql_where == '' ? ' WHERE ' : ' AND ') . "NOT $host_where_disabled";
} elseif ($host_where_status == '-4') {
$sql_where .= ($sql_where == '' ? ' WHERE ' : ' AND ') . "(host.status!='3' OR $host_where_disabled)";
if (db_column_exists('host', 'thold_failure_count')) {
$sql_where .= ($sql_where == '' ? ' WHERE ':' AND ') .
"(host.status != '3' OR $host_where_disabled OR (host.status != 2 AND thold_failure_count > 0 AND status_event_count >= thold_failure_count))";
} else {
$sql_where .= ($sql_where == '' ? ' WHERE ':' AND ') . " (host.status != '3' OR host.disabled = 'on')";
}
} else {
if (db_column_exists('host', 'thold_failure_count')) {
$sql_where .= ($sql_where == '' ? ' WHERE ':' AND ') .
"((host.status=$host_where_status OR (status != 2 AND thold_failure_count > 0 AND status_event_count > thold_failure_count) AND NOT $host_where_disabled)";
"(host.status=$host_where_status OR (status != 2 AND thold_failure_count > 0 AND status_event_count >= thold_failure_count) AND NOT $host_where_disabled)";
} else {
$sql_where .= ($sql_where == '' ? ' WHERE ':' AND ') . "(host.status=$host_where_status AND NOT $host_where_disabled)";
}
Expand Down

0 comments on commit 0d85e77

Please sign in to comment.