From c2f7d5551affdfd5b992aa9e229338f3fb868154 Mon Sep 17 00:00:00 2001 From: luckman212 Date: Wed, 26 Sep 2018 02:12:58 -0400 Subject: [PATCH] Fix a display bug in status_gateways.php This bug causes the Monitor IP to appear even when a gateway is unmonitored. The monitor IP from the last gateway in the list to have one will simply get repeated. This patch fixes that bug, and also cleans up a few other things- unused variables, gets var names to match whats in system_gateways.php, changes nest of if...elseif to cleaner switch() etc. --- src/usr/local/www/status_gateways.php | 185 ++++++++++++-------------- 1 file changed, 86 insertions(+), 99 deletions(-) diff --git a/src/usr/local/www/status_gateways.php b/src/usr/local/www/status_gateways.php index dbfedcc2d5..656fe0a18f 100644 --- a/src/usr/local/www/status_gateways.php +++ b/src/usr/local/www/status_gateways.php @@ -29,17 +29,11 @@ require_once("guiconfig.inc"); -define('COLOR', true); - $a_gateways = return_gateways_array(); -$gateways_status = array(); $gateways_status = return_gateways_status(true); -$now = time(); -$year = date("Y"); - -$pgtitle = array(gettext("Status"), gettext("Gateways"), gettext("Gateways")); -$pglinks = array("", "@self", "@self"); +$pgtitle = array(gettext("Status"), gettext("Gateways")); +$pglinks = array("", "@self"); $shortcut_section = "gateways"; include("head.inc"); @@ -68,110 +62,103 @@ display_top_tabs($tab_array); - $gateway) { + $gateway) { ?> - - - - - -(default)"; } -?> +?> + + + - - - - - - - - - - - -
- - + + + + + + + + + + + + +