From: Jo-Philipp Wich Date: Sun, 25 Jan 2009 17:28:15 +0000 (+0000) Subject: modules/freifunk: display status of all non-encrypted wireless networks if no freifun... X-Git-Tag: 0.9.0~738 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=d35063211c5fd3ee9d5ae542a76906b0699dad0c modules/freifunk: display status of all non-encrypted wireless networks if no freifunk zone is defined --- diff --git a/modules/freifunk/luasrc/model/cbi/freifunk/public_status.lua b/modules/freifunk/luasrc/model/cbi/freifunk/public_status.lua index 27ffd959f..56e956363 100644 --- a/modules/freifunk/luasrc/model/cbi/freifunk/public_status.lua +++ b/modules/freifunk/luasrc/model/cbi/freifunk/public_status.lua @@ -47,7 +47,10 @@ local wifidata = luci.sys.wifi.getiwconfig() local ifaces = {} for k, v in pairs(wireless) do - if v[".type"] == "wifi-iface" and luci.util.contains(ffwifs, v.device) then + if v[".type"] == "wifi-iface" and ( + luci.util.contains(ffwifs, v.device) or + ( #ffwifs == 0 and (not v.encryption or v.encryption == "none") ) ) + then table.insert(ifaces, v) end end