From 3b6317db27863f0a4840a61f16f31849a1c7b9d2 Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Thu, 10 Oct 2019 05:12:33 -0700 Subject: [PATCH] luci-app-simple-adblock: bugfix: fix invalid
entries Signed-off-by: Stan Grishin --- applications/luci-app-simple-adblock/Makefile | 2 +- .../luasrc/controller/simple-adblock.lua | 5 ++--- .../luasrc/model/cbi/simple-adblock.lua | 12 ++++++------ 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/applications/luci-app-simple-adblock/Makefile b/applications/luci-app-simple-adblock/Makefile index b7d1a79fb..a46abb821 100644 --- a/applications/luci-app-simple-adblock/Makefile +++ b/applications/luci-app-simple-adblock/Makefile @@ -10,7 +10,7 @@ LUCI_TITLE:=Simple Adblock Web UI LUCI_DESCRIPTION:=Provides Web UI for simple-adblock service. LUCI_DEPENDS:=+luci-mod-admin-full +simple-adblock LUCI_PKGARCH:=all -PKG_RELEASE:=37 +PKG_RELEASE:=38 include ../../luci.mk diff --git a/applications/luci-app-simple-adblock/luasrc/controller/simple-adblock.lua b/applications/luci-app-simple-adblock/luasrc/controller/simple-adblock.lua index 98f69ac96..acfea5bf3 100644 --- a/applications/luci-app-simple-adblock/luasrc/controller/simple-adblock.lua +++ b/applications/luci-app-simple-adblock/luasrc/controller/simple-adblock.lua @@ -1,7 +1,6 @@ module("luci.controller.simple-adblock", package.seeall) function index() - if not nixio.fs.access("/etc/config/simple-adblock") then - return + if nixio.fs.access("/etc/config/simple-adblock") then + entry({"admin", "services", "simple-adblock"}, cbi("simple-adblock"), _("Simple AdBlock")) end - entry({"admin", "services", "simple-adblock"}, cbi("simple-adblock"), _("Simple AdBlock")) end diff --git a/applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua b/applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua index f4153355d..9f392a20c 100644 --- a/applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua +++ b/applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua @@ -187,15 +187,15 @@ local dns_descr = translate("Pick the DNS resolution option to create the adbloc .. translate("README") .. [[]] .. " " .. translate("for details.") if not checkDnsmasq then - dns_descr = dns_descr .. "
" .. translate("Please note that") .. " dnsmasq.addnhosts " .. translate("is not supported on this system.") - dns_descr = dns_descr .. "
" .. translate("Please note that") .. " dnsmasq.conf " .. translate("is not supported on this system.") - dns_descr = dns_descr .. "
" .. translate("Please note that") .. " dnsmasq.ipset " .. translate("is not supported on this system.") - dns_descr = dns_descr .. "
" .. translate("Please note that") .. " dnsmasq.servers " .. translate("is not supported on this system.") + dns_descr = dns_descr .. "
" .. translate("Please note that") .. " dnsmasq.addnhosts " .. translate("is not supported on this system.") + dns_descr = dns_descr .. "
" .. translate("Please note that") .. " dnsmasq.conf " .. translate("is not supported on this system.") + dns_descr = dns_descr .. "
" .. translate("Please note that") .. " dnsmasq.ipset " .. translate("is not supported on this system.") + dns_descr = dns_descr .. "
" .. translate("Please note that") .. " dnsmasq.servers " .. translate("is not supported on this system.") elseif not checkDnsmasqIpset then - dns_descr = dns_descr .. "
" .. translate("Please note that") .. " dnsmasq.ipset " .. translate("is not supported on this system.") + dns_descr = dns_descr .. "
" .. translate("Please note that") .. " dnsmasq.ipset " .. translate("is not supported on this system.") end if not checkUnbound then - dns_descr = dns_descr .. "
" .. translate("Please note that") .. " unbound.adb_list " .. translate("is not supported on this system.") + dns_descr = dns_descr .. "
" .. translate("Please note that") .. " unbound.adb_list " .. translate("is not supported on this system.") end dns = s:taboption("advanced", ListValue, "dns", translate("DNS Service"), dns_descr) -- 2.25.1