From 3aae6ce82ef385d2c77a2c2073d231797bef4c13 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Sat, 5 May 2018 08:16:40 +0200 Subject: 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 --- .../luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'applications') 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 3786c7a4e..ec5a75cef 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 " .. "" .. "check the online documentation", "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 -- cgit v1.2.3