summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-adblock/luasrc
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2018-05-05 08:16:40 +0200
committerDirk Brenken <dev@brenken.org>2018-05-09 13:35:49 +0200
commit3aae6ce82ef385d2c77a2c2073d231797bef4c13 (patch)
tree1277efd8077b4f3ad106fe71bcf95c4e1fc82ab7 /applications/luci-app-adblock/luasrc
parentfa2975d7c5ccc111057d0803ca59f1cef186bf28 (diff)
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>
Diffstat (limited to 'applications/luci-app-adblock/luasrc')
-rw-r--r--applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua b/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua
index 3786c7a4e4..ec5a75cefc 100644
--- a/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua
+++ b/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua
@@ -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