From: Jo-Philipp Wich Date: Sun, 25 Sep 2011 22:58:17 +0000 (+0000) Subject: modules/admin-full: fix two issues observed on a virgin install X-Git-Tag: 0.11.0~1698 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8eb93354138685a83a3ae9994be770ceb63bf9fe;p=project%2Fluci.git modules/admin-full: fix two issues observed on a virgin install --- diff --git a/modules/admin-full/luasrc/controller/admin/network.lua b/modules/admin-full/luasrc/controller/admin/network.lua index e701d1db87..d151a9a599 100644 --- a/modules/admin-full/luasrc/controller/admin/network.lua +++ b/modules/admin-full/luasrc/controller/admin/network.lua @@ -247,7 +247,7 @@ function iface_status() } end - for _, device in ipairs(net:get_interfaces()) do + for _, device in ipairs(net:get_interfaces() or {}) do data.subdevices[#data.subdevices+1] = { name = device:shortname(), type = device:type(), diff --git a/modules/admin-full/luasrc/view/admin_network/iface_overview.htm b/modules/admin-full/luasrc/view/admin_network/iface_overview.htm index edfed7d7d2..6a94c2dfe8 100644 --- a/modules/admin-full/luasrc/view/admin_network/iface_overview.htm +++ b/modules/admin-full/luasrc/view/admin_network/iface_overview.htm @@ -74,9 +74,9 @@ $Id$ { if (ifcs) { - for (var i = 0; i < ifcs.length; i++) + for (var idx = 0; idx < ifcs.length; idx++) { - var ifc = ifcs[i]; + var ifc = ifcs[idx]; var html = ''; var s = document.getElementById(ifc.id + '-ifc-devices');