projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c36f21
)
Merge on_***_to handlers
author
Steven Barth
<steven@midlink.org>
Wed, 5 Nov 2008 21:12:19 +0000
(21:12 +0000)
committer
Steven Barth
<steven@midlink.org>
Wed, 5 Nov 2008 21:12:19 +0000
(21:12 +0000)
libs/web/luasrc/dispatcher.lua
patch
|
blob
|
history
diff --git
a/libs/web/luasrc/dispatcher.lua
b/libs/web/luasrc/dispatcher.lua
index 79532ddf1d1da1f5d1eef2ea863b6d74a72e6266..2323cf8d2980f5352b4f8bb03b8a76197b8921e8 100644
(file)
--- a/
libs/web/luasrc/dispatcher.lua
+++ b/
libs/web/luasrc/dispatcher.lua
@@
-529,6
+529,16
@@
function cbi(model, config)
end
end
+ if config.on_valid_to and state and state > 0 and state < 2 then
+ luci.http.redirect(config.on_valid_to)
+ return
+ end
+
+ if config.on_changed_to and state and state > 1 then
+ luci.http.redirect(config.on_changed_to)
+ return
+ end
+
if config.on_success_to and state and state > 0 then
luci.http.redirect(config.on_success_to)
return