summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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 0f49b90ce..d10b5c0b5 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