summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr/local/www/status_gateway_groups.php5
-rwxr-xr-xusr/local/www/status_gateways.php19
2 files changed, 11 insertions, 13 deletions
diff --git a/usr/local/www/status_gateway_groups.php b/usr/local/www/status_gateway_groups.php
index 730e55e..3c2d367 100755
--- a/usr/local/www/status_gateway_groups.php
+++ b/usr/local/www/status_gateway_groups.php
@@ -42,11 +42,8 @@ require("guiconfig.inc");
if (!is_array($config['gateways']['gateway_group']))
$config['gateways']['gateway_group'] = array();
-if (!is_array($config['gateways']['gateway_item']))
- $config['gateways']['gateway_item'] = array();
-
$a_gateway_groups = &$config['gateways']['gateway_group'];
-$a_gateways = &$config['gateways']['gateway_item'];
+$a_gateways = return_gateways_array();
$changedesc = "Gateway Groups: ";
$gateways_status = array();
diff --git a/usr/local/www/status_gateways.php b/usr/local/www/status_gateways.php
index 94b0a3a..cae896b 100755
--- a/usr/local/www/status_gateways.php
+++ b/usr/local/www/status_gateways.php
@@ -39,10 +39,7 @@
require("guiconfig.inc");
-if (!is_array($config['gateways']['gateway_item'])) {
- $config['gateways']['gateway_item'] = array();
-}
-$a_gateways = &$config['gateways']['gateway_item'];
+$a_gateways = return_gateways_array();
$gateways_status = array();
$gateways_status = return_gateways_status();
@@ -116,11 +113,15 @@ include("head.inc");
PRINT "<tr><td bgcolor=\"$bgcolor\" > $online </td><td>";
$lastchange = $gateways_status[$monitor]['lastcheck'];
- $lastchange = explode(" ", $lastchange);
- array_shift($lastchange);
- array_shift($lastchange);
- $lastchange = implode(" ", $lastchange);
- PRINT "Last succes $lastchange";
+ if(!empty($lastchange)) {
+ $lastchange = explode(" ", $lastchange);
+ array_shift($lastchange);
+ array_shift($lastchange);
+ $lastchange = implode(" ", $lastchange);
+ PRINT "Last succes $lastchange";
+ } else {
+ print "No data available";
+ }
PRINT "</td></tr>";
?>
</table>
OpenPOWER on IntegriCloud