From 6e5558db822e6de5407ae738620c8dd169d7cb56 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Sun, 1 May 2011 17:26:06 +0000 Subject: [PATCH] cleanups etc git-svn-id: http://www.observium.org/svn/observer/trunk@2213 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/print-interface-adsl.inc.php | 20 +++++------ html/pages/device/edit/device.inc.php | 11 ++++--- html/pages/device/routing/ospf.inc.php | 33 ++++++++++--------- .../device/routing/overview/ospf.inc.php | 11 +++---- html/pages/routing.inc.php | 1 - html/pages/routing/bgp.inc.php | 2 -- html/pages/routing/ospf.inc.php | 10 +++--- includes/polling/bgp-peers.inc.php | 2 +- includes/static-config.php | 15 ++------- 9 files changed, 43 insertions(+), 62 deletions(-) diff --git a/html/includes/print-interface-adsl.inc.php b/html/includes/print-interface-adsl.inc.php index f2d2e0900..43ecfa97a 100644 --- a/html/includes/print-interface-adsl.inc.php +++ b/html/includes/print-interface-adsl.inc.php @@ -1,6 +1,6 @@ 0 || $interface['ifOutErrors_delta'] > 0) { $error_img = generate_port_link($interface,"Interface Errors","port_errors"); -} else { $error_img = ""; } +} else { + $error_img = ""; +} -# FIXME leading slash - does javascript honor base tag? echo(" +onclick=\"location.href='device/".$device['device_id']."/port/".$interface['interface_id']."/'\" style='cursor: pointer;'> "); echo(" " . generate_port_link($interface, $interface['ifIndex'] . ". ".$interface['label']) . " @@ -30,17 +31,15 @@ unset ($break); if ($port_details) { $ipdata = mysql_query("SELECT * FROM `ipv4_addresses` WHERE `interface_id` = '" . $interface['interface_id'] . "'"); - while ($ip = mysql_fetch_Array($ipdata)) + while ($ip = mysql_fetch_assoc($ipdata)) { - # FIXME leading slash - does javascript honor base tag? - echo("$break $ip[ipv4_address]/$ip[ipv4_prefixlen]"); + echo("$break ".$ip['ipv4_address']."/".$ip['ipv4_prefixlen'].""); $break = ","; } $ip6data = mysql_query("SELECT * FROM `ipv6_addresses` WHERE `interface_id` = '" . $interface['interface_id'] . "'"); - while ($ip6 = mysql_fetch_Array($ip6data)) + while ($ip6 = mysql_fetch_assoc($ip6data)) { - # FIXME leading slash - does javascript honor base tag? - echo("$break ".Net_IPv6::compress($ip6['ipv6_address'])."/".$ip6['ipv6_prefixlen'].""); + echo("$break ".Net_IPv6::compress($ip6['ipv6_address'])."/".$ip6['ipv6_prefixlen'].""); $break = ","; } } @@ -141,7 +140,6 @@ if ($graph_type && is_file($graph_file)) onmouseout=\"return nd();\"> "); echo(""); - } ?> \ No newline at end of file diff --git a/html/pages/device/edit/device.inc.php b/html/pages/device/edit/device.inc.php index 967896806..f426c4f0b 100644 --- a/html/pages/device/edit/device.inc.php +++ b/html/pages/device/edit/device.inc.php @@ -87,15 +87,16 @@ if ($updated && $update_message)