From: Steven Barth Date: Tue, 26 Aug 2008 19:36:41 +0000 (+0000) Subject: libs/cbi: Added support for enum dependencies X-Git-Tag: 0.8.0~295 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=43b3217e5595acc91ff6d7614a5c21c88696fbcc;p=oweals%2Fluci.git libs/cbi: Added support for enum dependencies --- diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index 75c25adfa..2583ecd07 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -1030,7 +1030,11 @@ function ListValue.__init__(self, ...) self:value("") end for k, v in pairs(vs.values) do - self:value(k, v) + local deps = {} + if vs.enum_depends and vs.enum_depends[k] then + deps = _uvl_strip_remote_dependencies(vs.enum_depends[k]) + end + self:value(k, v, unpack(deps)) end end end