X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=libs%2Fcbi%2Fluasrc%2Fcbi.lua;h=c9db8beb255dd5e201ef29a92d5ad777ecf5879a;hp=9b947cb2f0fe841dacab2316c334e6732db2c54c;hb=1f83b916ac83eff03e582084dd99579689570360;hpb=23e0a7da6a698072871081364e8c7edf76a36f32;ds=sidebyside diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index 9b947cb2f..c9db8beb2 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -561,7 +561,7 @@ function Delegator.get(self, name) local node = self.nodes[name] if type(node) == "string" then - node = load(node) + node = load(node, name) end if type(node) == "table" and getmetatable(node) == nil then @@ -616,8 +616,13 @@ function Delegator.parse(self, ...) self.current = newcurrent or self.current self.active = self:get(self.current) if type(self.active) ~= "function" then - self.active:parse(false) - return FROM_PROCEED + self.active:populate_delegator(self) + local stat = self.active:parse(false) + if stat == FORM_SKIP then + return self:parse(...) + else + return FORM_PROCEED + end else return self:parse(...) end