luci-0.9: merge r5952

This commit is contained in:
Jo-Philipp Wich 2010-03-27 17:42:00 +00:00
parent e8b29453c8
commit 3cdccaa76c

View file

@ -65,7 +65,7 @@ m.uci:foreach("network", "switch",
end
s.create = function(self, section)
local n = tonumber(section)
local n = tonumber(section and section:match("(%d+)"))
if n ~= nil and n >= 0 then
local sn = "%s_%d" %{ x['.name'], n }
local rv = TypedSection.create(self, sn)