From ba689499bb82e7bff9a118feaec6a7fd032157e0 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Wed, 5 Nov 2008 21:12:19 +0000 Subject: Merge on_***_to handlers --- libs/web/luasrc/dispatcher.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libs') diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua index 79532ddf1..2323cf8d2 100644 --- 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 -- cgit v1.2.3