summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc/dispatcher.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-11-21 00:14:03 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-11-21 00:14:03 +0000
commit25754119d45d3cf8695ae0ee8c8332d69f9985c3 (patch)
treeb6b1558faba90231ef77427210c3d96cce3f0dec /libs/web/luasrc/dispatcher.lua
parentbcdc4c16b2c0ff69c14e0ad5a8e4209fbf4ee269 (diff)
libs/web: expose cbi map redirect property to page templates
Diffstat (limited to 'libs/web/luasrc/dispatcher.lua')
-rw-r--r--libs/web/luasrc/dispatcher.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua
index 0f49b90ce3..d10b5c0b5f 100644
--- a/libs/web/luasrc/dispatcher.lua
+++ b/libs/web/luasrc/dispatcher.lua
@@ -718,6 +718,7 @@ local function _cbi(self, ...)
end
end
+ local redirect
local pageaction = true
http.header("X-CBI-State", state or 0)
if not config.noheader then
@@ -728,9 +729,18 @@ local function _cbi(self, ...)
if res.pageaction == false then
pageaction = false
end
+ if res.redirect then
+ redirect = redirect or res.redirect
+ end
end
if not config.nofooter then
- tpl.render("cbi/footer", {flow = config, pageaction=pageaction, state = state, autoapply = config.autoapply})
+ tpl.render("cbi/footer", {
+ flow = config,
+ pageaction = pageaction,
+ redirect = redirect,
+ state = state,
+ autoapply = config.autoapply
+ })
end
end