luci-app-adblock: support new workflow
* adapt Adblock to support the new cbi apply workflow * tested successfully with old & new workflow Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
parent
fa2975d7c5
commit
3aae6ce82e
1 changed files with 2 additions and 1 deletions
|
@ -24,8 +24,9 @@ m = Map("adblock", translate("Adblock"),
|
|||
.. translatef("For further information "
|
||||
.. "<a href=\"%s\" target=\"_blank\">"
|
||||
.. "check the online documentation</a>", "https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md"))
|
||||
m.apply_on_parse = true
|
||||
|
||||
function m.on_after_commit(self)
|
||||
function m.on_apply(self)
|
||||
luci.sys.call("/etc/init.d/adblock reload >/dev/null 2>&1")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "adblock"))
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue