libs/cbi: Added support for enum dependencies
authorSteven Barth <steven@midlink.org>
Tue, 26 Aug 2008 19:36:41 +0000 (19:36 +0000)
committerSteven Barth <steven@midlink.org>
Tue, 26 Aug 2008 19:36:41 +0000 (19:36 +0000)
libs/cbi/luasrc/cbi.lua

index 75c25adfa6abad906569b5a8d42374677a928a06..2583ecd070b3eec34b2e088c66a29ff31ae2d63f 100644 (file)
@@ -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