diff options
Diffstat (limited to 'libs/cbi/luasrc/cbi.lua')
-rw-r--r-- | libs/cbi/luasrc/cbi.lua | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index 6432a2590d..d2de8685b5 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -1011,7 +1011,7 @@ function AbstractValue.cfgvalue(self, section) return value[1] end elseif self.cast == "table" then - return {value} + return luci.util.split(value, "%s+", nil, true) end end @@ -1065,6 +1065,20 @@ function DummyValue.__init__(self, ...) self.value = nil end +function DummyValue.cfgvalue(self, section) + local value + if self.value then + if type(self.value) == "function" then + value = self:value(section) + else + value = self.value + end + else + value = AbstractValue.cfgvalue(self, section) + end + return value +end + function DummyValue.parse(self) end |