diff --git a/lam/lib/types/dhcp.inc b/lam/lib/types/dhcp.inc index fd809059..268dcd73 100644 --- a/lam/lib/types/dhcp.inc +++ b/lam/lib/types/dhcp.inc @@ -91,9 +91,9 @@ class dhcp extends baseType { */ public function getListAttributeDescriptions() { return array ( - "cn" => ("Subnet"), - "dhcprange" => ("IP range"), - "fixed_ips" => ("Fixed IP address / MAC address / description") + "cn" => _("Subnet"), + "dhcprange" => _("Ranges"), + "fixed_ips" => _("Fixed IP address / MAC address / description") ); } @@ -142,8 +142,13 @@ class lamDHCPList extends lamList { echo ""; for ($i = 0; $i < sizeof($entries); $i++) { echo ""; - echo ""; - echo ""; + $dhcpstatements = array(''); + if (isset($entries[$i]['dhcpstatements'][0])) { + $dhcpstatements = explode(" ",$entries[$i]['dhcpstatements'][0]); + } + echo ""; + $dhcphwaddress = explode(" ",$entries[$i]['dhcphwaddress'][0]); + echo ""; echo ""; echo ""; } @@ -164,7 +169,7 @@ class lamDHCPList extends lamList { } } elseif ($attribute=="dhcprange") { // DHCP Range - if (is_array($entry['dhcprange'])) { + if (isset($entry['dhcprange'])) { echo"
".array_pop(explode(" ",$entries[$i]['dhcpstatements'][0]))."".array_pop(explode(" ",$entries[$i]['dhcphwaddress'][0]))."".array_pop($dhcpstatements)."".array_pop($dhcphwaddress)."".$entries[$i]['cn'][0]."
"; foreach($entry['dhcprange'] AS $id=>$value) { if (!is_numeric($value)) {