modules/freifunk: show warning when libiwinfo is not installed.
[project/luci.git] / modules / freifunk / luasrc / view / freifunk-map / map.htm
index 7ecf495..f373a7a 100644 (file)
@@ -65,6 +65,9 @@
                        function ffmapinit()
                        {
                                if(null!=window.map)map.Dispose();
                        function ffmapinit()
                        {
                                if(null!=window.map)map.Dispose();
+
+                               var INFINITE = 99.99;
+
                                map = new VEMap('ffmap');
                                <%
                                        local fd
                                map = new VEMap('ffmap');
                                <%
                                        local fd
                                        end)
 
                                        if fd then
                                        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()
                                                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
                                %>
                        }
                                        end
                                %>
                        }