luci-0.9: merge r5027
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 7 Jul 2009 17:31:06 +0000 (17:31 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 7 Jul 2009 17:31:06 +0000 (17:31 +0000)
modules/freifunk/luasrc/view/freifunk-map/map.htm

index 7ecf49521084b992ce995e200926d29f69a862e7..f373a7a6b7006cb48f77795e9b6e622f7e98f16f 100644 (file)
@@ -65,6 +65,9 @@
                        function ffmapinit()
                        {
                                if(null!=window.map)map.Dispose();
+
+                               var INFINITE = 99.99;
+
                                map = new VEMap('ffmap');
                                <%
                                        local fd
                                        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
                                %>
                        }