diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-04-07 14:40:44 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-04-07 14:40:44 +0200 |
commit | 75ac400168da8feb7ae193d5ef0e419bcaac8aa5 (patch) | |
tree | ad5917e729b316f1f271003d04da6c7ec34a13a7 /applications/luci-app-vpnbypass/luasrc | |
parent | 8c636c87ee14d4d0bac904b23f35b016b8cf19e0 (diff) |
luci-app-vpnbypass: remove explicit libuci requirement
There is no direct user of the libuci-lua api, just some commented out code.
Rewrite the commented code to use the Map's uci cursor and remove the
explicit require.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-vpnbypass/luasrc')
-rw-r--r-- | applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua b/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua index 18fbeaaf4..6545154c2 100644 --- a/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua +++ b/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua @@ -1,7 +1,5 @@ readmeURL = "https://github.com/openwrt/packages/blob/master/net/vpnbypass/files/README.md" -uci = require "uci" - m = Map("vpnbypass", translate("VPN Bypass Settings")) s = m:section(NamedSection, "config", "vpnbypass") @@ -32,7 +30,7 @@ p2.optional = false -- Local Subnets r1 = s:option(DynamicList, "localsubnet", translate("Local IP Addresses to Bypass"), translate("Local IP addresses or subnets with direct internet access (outside of the VPN tunnel)")) r1.datatype = "ip4addr" --- r1.placeholder = luci.ip.new(uci.cursor():get("network", "lan", "ipaddr") .. "/" .. uci.cursor():get("network", "lan", "netmask")) +-- r1.placeholder = luci.ip.new(m.uci:get("network", "lan", "ipaddr"), m.uci:get("network", "lan", "netmask")) r1.addremove = false r1.optional = false |