From bf123fb7c4918120f5f9f638866bfae1e5b23a54 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 13 Aug 2018 09:20:43 +0200 Subject: 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 --- applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 273675cd3..82168712a 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 %>