From: Jo-Philipp Wich Date: Mon, 13 Aug 2018 07:20:43 +0000 (+0200) Subject: luci-app-firewall: allow "open ports" when no wan zone exists X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f64b1523447547032d5280fb0bcdde570f2ca913;p=project%2Fluci.git luci-app-firewall: allow "open ports" when no wan zone exists Arguably this makes little if no wan zone exists but prefer consistency over heuristics and always render the "open port" shortcut. Fixes #2056 Signed-off-by: Jo-Philipp Wich (cherry picked from commit bf123fb7c4918120f5f9f638866bfae1e5b23a54) --- diff --git a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm index 273675cd30..82168712ae 100644 --- a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm +++ b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm @@ -1,11 +1,9 @@ <% local fw = require "luci.model.firewall".init() - local wz = fw:get_zone("wan") - local lz = fw:get_zone("lan") local zones = fw:get_zones() %> -<% if wz then %> +<% if #zones > 0 then %>

<%:Open ports on router%>

@@ -71,7 +69,7 @@ <% end %> -<% if wz then %> +<% if #zones > 0 then %>