From e50c84d396ec9d2ab6d128d2042e8a173ec95441 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Thu, 12 May 2011 20:09:10 +0000 Subject: [PATCH] fix print-menubar git-svn-id: http://www.observium.org/svn/observer/trunk@2286 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/print-menubar.php | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index 9a83383bc..33af9d873 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -1,23 +1,23 @@ Alerts ('.$interface_alerts.')'); } -$sql = "SELECT * FROM `ports` AS P, `devices` as D WHERE P.`deleted` = '1' AND D.device_id = P.device_id"; -$query = mysql_query($sql); $deleted_ports = 0; -while ($interface = mysql_fetch_assoc($query)) +foreach (dbFetchRows("SELECT * FROM `ports` AS P, `devices` as D WHERE P.`deleted` = '1' AND D.device_id = P.device_id") as $interface) { if (port_permitted($interface['interface_id'], $interface['device_id'])) { @@ -199,9 +197,7 @@ if ($deleted_ports) { echo('
  • = '5' && ($routing_count['bgp']+$routing_count['ospf']+$routing_count['cef']+$routing_count['vrf']) > "0") {