diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-07-07 17:30:26 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-07-07 17:30:26 +0000 |
commit | b7b3515179c1c895457b1420d5ab64f5403301a9 (patch) | |
tree | 5ca3c0d56953b3cc4b756f7dde0608493fee4ef9 | |
parent | 73fe2dc72bb7ceacb7dfdf8f97e8a378ad423bf2 (diff) |
modules/freifunk: fix some quirks in the map
-rw-r--r-- | modules/freifunk/luasrc/view/freifunk-map/map.htm | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/modules/freifunk/luasrc/view/freifunk-map/map.htm b/modules/freifunk/luasrc/view/freifunk-map/map.htm index 7ecf495210..f373a7a6b7 100644 --- a/modules/freifunk/luasrc/view/freifunk-map/map.htm +++ b/modules/freifunk/luasrc/view/freifunk-map/map.htm @@ -65,6 +65,9 @@ function ffmapinit() { if(null!=window.map)map.Dispose(); + + var INFINITE = 99.99; + map = new VEMap('ffmap'); <% local fd @@ -77,12 +80,19 @@ end) if fd then - while true do - local ln = fd:read("*l") - if not ln then break end - write(ln) - end + local data = fd:read("*a") fd:close() + + if data then + local line + for line in data:gmatch("[^\n]+") do + if line:match(";$") then + write(line .. "\n") + else + break + end + end + end end %> } |