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: https://git.librecmc.org/?a=commitdiff_plain;h=bf123fb7c4918120f5f9f638866bfae1e5b23a54;p=oweals%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 --- 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 %>