Skip to content

Commit

Permalink
Make NEMS TV Dashboard compatible with PHP 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
NEMSLinux committed Mar 12, 2024
1 parent ba461bc commit 3449dcb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion debpack/DEBIAN/control
Expand Up @@ -4,7 +4,7 @@ Priority: required
Section: main
Maintainer: NEMS Linux <nems@category5.tv>
Architecture: all
Version: 1.6.002
Version: 1.6.003
Provides: nems-tv
Description: NEMS TV Dashboard
Depends: apache2
12 changes: 6 additions & 6 deletions debpack/var/www/nems-tv/connectors/livestatus.php
Expand Up @@ -130,7 +130,7 @@ function queryLivestatus($query) {
<?php

$hosts = array();
while ( list(, $filter) = each($custom_filters) ) {
foreach ($custom_filters as $filter) {

if ($in_notification_period == 1) {
$query = <<<"EOQ"
Expand Down Expand Up @@ -168,7 +168,7 @@ function queryLivestatus($query) {

$save = "";
$output = "";
while ( list(, $row) = each($hosts) ) {
foreach ($hosts as $row) {
$output .= "<tr class=\"critical\"><td>".$row[0]."</td><td>".$row[1]."</td></tr>";
$save .= $row[0];
}
Expand Down Expand Up @@ -205,7 +205,7 @@ function queryLivestatus($query) {
$total_hosts = 0;

reset($custom_filters);
while ( list(, $filter) = each($custom_filters) ) {
foreach ($custom_filters as $filter) {
$query = <<<"EOQ"
GET hosts
Filter: $filter
Expand Down Expand Up @@ -241,7 +241,7 @@ function queryLivestatus($query) {
$total_services = 0;

reset($custom_filters);
while ( list(, $filter) = each($custom_filters) ) {
foreach ($custom_filters as $filter) {
$query = <<<"EOQ"
GET services
Filter: $filter
Expand Down Expand Up @@ -345,7 +345,7 @@ function queryLivestatus($query) {

reset($custom_filters);
$services = array();
while ( list(, $filter) = each($custom_filters) ) {
foreach ($custom_filters as $filter) {

if ($in_notification_period == 1) {
$query = <<<"EOQ"
Expand Down Expand Up @@ -389,7 +389,7 @@ function queryLivestatus($query) {

$save = "";
$output = "";
while ( list(, $row) = each($services) ) {
foreach ($services as $row) {
if ($row[2] == 2) {
$class = "critical";
} elseif ($row[2] == 1) {
Expand Down
4 changes: 2 additions & 2 deletions debpack/var/www/nems-tv/connectors/ncs.php
Expand Up @@ -58,7 +58,7 @@ function sort_by_state($a, $b) {
<?php
$save = "";
$output = "";
while ( list(, $row) = each($livestatus->unhandled->hosts) ) {
foreach ($livestatus->unhandled->hosts as $row) {
$output .= "<tr class=\"critical\"><td>" . $thisserver['state']['decrypted']->alias . "</td><td>".$row[0]."</td><td>".$row[1]."</td></tr>";
$save .= $row[0];
}
Expand Down Expand Up @@ -161,7 +161,7 @@ function sort_by_state($a, $b) {
$save = "";
$output = "";

while ( list(, $row) = each($livestatus->unhandled->services) ) {
foreach ($livestatus->unhandled->services as $row) {
if ($row[2] == 2) {
$class = "critical";
} elseif ($row[2] == 1) {
Expand Down

0 comments on commit 3449dcb

Please sign in to comment.