From 096ee9c22de0afd71a17518bcb112807e46fe49a Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 16 Jun 2010 11:24:00 +0000 Subject: [PATCH] Make some non functional changes, mostly to keep up with latest gw changes. Related to Ticket #666 --- etc/inc/gwlb.inc | 2 +- usr/local/www/status_gateway_groups.php | 2 +- usr/local/www/status_gateways.php | 6 +++--- usr/local/www/widgets/widgets/gateways.widget.php | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 6b3be9f660..268d94c710 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -480,7 +480,7 @@ function lookup_gateway_monitor_ip_by_name($name) { $gateway['monitor'] = "127.0.0.2"; $monitorip = $gateway['monitor']; - if($monitorip == "") + if(!is_ipaddr($monitorip)) $monitorip = $gateway['gateway']; return ($monitorip); diff --git a/usr/local/www/status_gateway_groups.php b/usr/local/www/status_gateway_groups.php index d4f0d857f5..5ed4aa96f6 100755 --- a/usr/local/www/status_gateway_groups.php +++ b/usr/local/www/status_gateway_groups.php @@ -128,7 +128,7 @@ include("head.inc"); } elseif (stristr($status, "delay")) { $online = "Warning, Latency"; $bgcolor = "khaki"; - } elseif (stristr($status, "none")) { + } elseif ($status == "none") { $online = "Online"; $bgcolor = "lightgreen"; } else { diff --git a/usr/local/www/status_gateways.php b/usr/local/www/status_gateways.php index 125100b905..4d85a423f2 100755 --- a/usr/local/www/status_gateways.php +++ b/usr/local/www/status_gateways.php @@ -99,7 +99,7 @@ include("head.inc"); } elseif (stristr($gateway['status'], "delay")) { $online = "Warning, Latency"; $bgcolor = "khaki"; - } elseif (stristr($gateway['status'], "none")) { + } elseif ($gateway['status'] == "none") { $online = "Online"; $bgcolor = "lightgreen"; } @@ -110,9 +110,9 @@ include("head.inc"); array_shift($lastchange); array_shift($lastchange); $lastchange = implode(" ", $lastchange); - PRINT "Last check $lastchange"; + echo "Last check $lastchange"; } else { - print "Gathering data"; + echo "Gathering data"; } echo ""; ?> diff --git a/usr/local/www/widgets/widgets/gateways.widget.php b/usr/local/www/widgets/widgets/gateways.widget.php index b8bca28c5d..a744d5b35f 100644 --- a/usr/local/www/widgets/widgets/gateways.widget.php +++ b/usr/local/www/widgets/widgets/gateways.widget.php @@ -54,11 +54,11 @@ $counter = 1; - + - - + + @@ -80,7 +80,7 @@ $counter = 1; } elseif (stristr($gateway['status'], "delay")) { $online = "Warning, Latency"; $bgcolor = "khaki"; - } elseif (stristr($gateway['status'], "none")) { + } elseif ($gateway['status'] == "none") { $online = "Online"; $bgcolor = "lightgreen"; } else