From: Dirk Brenken Date: Thu, 15 Mar 2018 14:39:30 +0000 (+0100) Subject: luci-app-adblock: fix function calls X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=refs%2Fpull%2F1684%2Fhead;p=project%2Fluci.git luci-app-adblock: fix function calls * fix function calls that have an implicit extra parameter self, pre-requisite for PR #1681 Signed-off-by: Dirk Brenken --- diff --git a/applications/luci-app-adblock/luasrc/controller/adblock.lua b/applications/luci-app-adblock/luasrc/controller/adblock.lua index d4368e7890..700f187b35 100644 --- a/applications/luci-app-adblock/luasrc/controller/adblock.lua +++ b/applications/luci-app-adblock/luasrc/controller/adblock.lua @@ -3,7 +3,6 @@ module("luci.controller.adblock", package.seeall) -local fs = require("nixio.fs") local util = require("luci.util") local templ = require("luci.template") local i18n = require("luci.i18n") diff --git a/applications/luci-app-adblock/luasrc/model/cbi/adblock/blacklist_tab.lua b/applications/luci-app-adblock/luasrc/model/cbi/adblock/blacklist_tab.lua index ef70100e4f..8526a4b5eb 100644 --- a/applications/luci-app-adblock/luasrc/model/cbi/adblock/blacklist_tab.lua +++ b/applications/luci-app-adblock/luasrc/model/cbi/adblock/blacklist_tab.lua @@ -4,7 +4,7 @@ local fs = require("nixio.fs") local util = require("luci.util") local uci = require("uci") -local adbinput = uci.get("adblock", "blacklist", "adb_src" or "/etc/adblock/adblock.blacklist") +local adbinput = uci:get("adblock", "blacklist", "adb_src") or "/etc/adblock/adblock.blacklist" if not nixio.fs.access(adbinput) then m = SimpleForm("error", nil, 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 aef0a9fa9d..3786c7a4e4 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 @@ -7,7 +7,7 @@ local sys = require("luci.sys") local util = require("luci.util") local dump = util.ubus("network.interface", "dump", {}) local json = require("luci.jsonc") -local adbinput = uci.get("adblock", "global", "adb_rtfile") or "/tmp/adb_runtime.json" +local adbinput = uci:get("adblock", "global", "adb_rtfile") or "/tmp/adb_runtime.json" if not uci:get("adblock", "extra") then m = SimpleForm("", nil, translate("Please update your adblock config file to use this package.
") diff --git a/applications/luci-app-adblock/luasrc/model/cbi/adblock/whitelist_tab.lua b/applications/luci-app-adblock/luasrc/model/cbi/adblock/whitelist_tab.lua index a3659eb469..df8b34f8e7 100644 --- a/applications/luci-app-adblock/luasrc/model/cbi/adblock/whitelist_tab.lua +++ b/applications/luci-app-adblock/luasrc/model/cbi/adblock/whitelist_tab.lua @@ -4,7 +4,7 @@ local fs = require("nixio.fs") local util = require("luci.util") local uci = require("uci") -local adbinput = uci.get("adblock", "global", "adb_whitelist") or "/etc/adblock/adblock.whitelist" +local adbinput = uci:get("adblock", "global", "adb_whitelist") or "/etc/adblock/adblock.whitelist" if not nixio.fs.access(adbinput) then m = SimpleForm("error", nil, translate("Input file not found, please check your configuration."))