From: Dirk Brenken Date: Sat, 5 May 2018 06:16:40 +0000 (+0200) Subject: luci-app-adblock: support new workflow X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3aae6ce82ef385d2c77a2c2073d231797bef4c13;p=oweals%2Fluci.git 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 --- 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