From 284f85fb4e185bf743c404161d0a83be858420c6 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Mon, 9 Nov 2009 11:22:29 +0000 Subject: [PATCH] CBI: Fix subdependencies --- libs/cbi/luasrc/cbi.lua | 3 ++- libs/cbi/luasrc/view/cbi/full_valuefooter.htm | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index 8ca9e5c8d..f6a2694b2 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -1265,6 +1265,7 @@ function AbstractValue.__init__(self, map, section, option, ...) self.tag_reqerror = {} self.tag_error = {} self.deps = {} + self.subdeps = {} --self.cast = "string" self.track_missing = false @@ -1595,7 +1596,7 @@ function ListValue.value(self, key, val, ...) table.insert(self.vallist, tostring(val)) for i, deps in ipairs({...}) do - table.insert(self.deps, {add = "-"..key, deps=deps}) + self.subdeps[#self.subdeps + 1] = {add = "-"..key, deps=deps} end end diff --git a/libs/cbi/luasrc/view/cbi/full_valuefooter.htm b/libs/cbi/luasrc/view/cbi/full_valuefooter.htm index bdcd31484..9130a99f9 100644 --- a/libs/cbi/luasrc/view/cbi/full_valuefooter.htm +++ b/libs/cbi/luasrc/view/cbi/full_valuefooter.htm @@ -27,8 +27,21 @@ $Id$ <%- end -%> -<% if #self.deps > 0 then -%> + +<% if #self.deps > 0 or #self.subdeps > 0 then -%>