summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc/dispatcher.lua
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-11-01 18:32:02 +0000
committerSteven Barth <steven@midlink.org>2008-11-01 18:32:02 +0000
commitc7a06b61c778a9e24b67a1a89992c1dd77886a21 (patch)
tree1d07fd5e18d4818a1cd9b030d68a64a3c52d02dc /libs/web/luasrc/dispatcher.lua
parentae6fd93b8ce6b47d68a9ad96e0984edb91ee1716 (diff)
Extend CBI state handling
Diffstat (limited to 'libs/web/luasrc/dispatcher.lua')
-rw-r--r--libs/web/luasrc/dispatcher.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua
index 51f6d9695f..22d9dd9bc3 100644
--- a/libs/web/luasrc/dispatcher.lua
+++ b/libs/web/luasrc/dispatcher.lua
@@ -521,6 +521,12 @@ function cbi(model, config)
end
end
+ if config.state_handler then
+ if not config.state_handler(state, maps) then
+ return
+ end
+ end
+
local pageaction = true
http.header("X-CBI-State", state or 0)
luci.template.render("cbi/header", {state = state})