From: Jo-Philipp Wich Date: Mon, 9 Nov 2009 00:32:36 +0000 (+0000) Subject: libs/cbi: fix some logic errors in firewall zone picker widget X-Git-Tag: 0.10.0~975 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5c4cd0c4d6543fa0428b6c7eb5d2c131d29befba;p=oweals%2Fluci.git libs/cbi: fix some logic errors in firewall zone picker widget --- diff --git a/libs/cbi/luasrc/view/cbi/firewall_zonelist.htm b/libs/cbi/luasrc/view/cbi/firewall_zonelist.htm index dcc14fb2d..d7cea4edb 100644 --- a/libs/cbi/luasrc/view/cbi/firewall_zonelist.htm +++ b/libs/cbi/luasrc/view/cbi/firewall_zonelist.htm @@ -51,9 +51,8 @@ $Id$ local zempty = true for _, net in ipairs(zone:get_networks()) do net = nwm:get_network(net) - zempty = false if net then - local nempty = true + zempty = false %>   <%- if net:name() == self.network then -%> @@ -62,6 +61,7 @@ $Id$ <%=net:name()%>: <%- end -%> <% + local nempty = true for _, iface in ipairs(net and net:get_interfaces() or {}) do if not iface:is_bridgeport() then nempty = false