From: Steven Barth Date: Wed, 5 Nov 2008 21:12:19 +0000 (+0000) Subject: Merge on_***_to handlers X-Git-Tag: 0.9.0~1008 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ba689499bb82e7bff9a118feaec6a7fd032157e0;p=oweals%2Fluci.git Merge on_***_to handlers --- 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