libs/cbi: implement on_parse hook for maps
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 9 Nov 2009 00:32:05 +0000 (00:32 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 9 Nov 2009 00:32:05 +0000 (00:32 +0000)
libs/cbi/luasrc/cbi.lua

index 9268d412df9a607364a3e2414d0d24ffd91f0084..8ca9e5c8d17dce069a3d9d22477be29a4bfe9a1b 100644 (file)
@@ -351,6 +351,7 @@ end
 -- Use optimized UCI writing
 function Map.parse(self, readinput, ...)
        self.readinput = (readinput ~= false)
+       self:_run_hooks("on_parse")
 
        if self:formvalue("cbi.skip") then
                self.state = FORM_SKIP