projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bcdc4c1
)
libs/web: expose cbi map redirect property to page templates
author
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 21 Nov 2010 00:14:03 +0000
(
00:14
+0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 21 Nov 2010 00:14:03 +0000
(
00:14
+0000)
libs/web/luasrc/dispatcher.lua
patch
|
blob
|
history
diff --git
a/libs/web/luasrc/dispatcher.lua
b/libs/web/luasrc/dispatcher.lua
index
0f49b90
..
d10b5c0
100644
(file)
--- a/
libs/web/luasrc/dispatcher.lua
+++ b/
libs/web/luasrc/dispatcher.lua
@@
-718,6
+718,7
@@
local function _cbi(self, ...)
end
end
end
end
+ local redirect
local pageaction = true
http.header("X-CBI-State", state or 0)
if not config.noheader then
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.pageaction == false then
pageaction = false
end
+ if res.redirect then
+ redirect = redirect or res.redirect
+ end
end
if not config.nofooter then
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
end
end