From 20ec00368f4e093a47cec245feda4da5a47ad375 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Thu, 19 Jan 2012 14:00:29 +0000 Subject: [PATCH] don't print header when no dot1d data is available git-svn-id: http://www.observium.org/svn/observer/trunk@2841 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/discovery/vlans.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/discovery/vlans.inc.php b/includes/discovery/vlans.inc.php index 33a6436912..8eb0f6eb00 100644 --- a/includes/discovery/vlans.inc.php +++ b/includes/discovery/vlans.inc.php @@ -26,8 +26,11 @@ foreach($this_vlans as $vlan) echo("VLAN $vlan \n"); - echo(str_pad("dot1d id", 10).str_pad("ifIndex", 10).str_pad("Port Name", 25). - str_pad("Priority", 10).str_pad("State", 15).str_pad("Cost", 10)."\n"); + if ($vlan_data) + { + echo(str_pad("dot1d id", 10).str_pad("ifIndex", 10).str_pad("Port Name", 25). + str_pad("Priority", 10).str_pad("State", 15).str_pad("Cost", 10)."\n"); + } foreach($vlan_data as $vlan_port_id => $vlan_port) {