X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/4c00efd678bf171d09a61d2d53b3d6ad52c44a40..418b315ea57e34bd4f0ef43247163f20b8ebaa00:/app/controllers/swf_controller.rb diff --git a/app/controllers/swf_controller.rb b/app/controllers/swf_controller.rb index 2200ab652..628a95e06 100644 --- a/app/controllers/swf_controller.rb +++ b/app/controllers/swf_controller.rb @@ -1,6 +1,6 @@ class SwfController < ApplicationController session :off - before_filter :check_availability + before_filter :check_read_availability # to log: # RAILS_DEFAULT_LOGGER.error("Args: #{args[0]}, #{args[1]}, #{args[2]}, #{args[3]}") @@ -95,8 +95,7 @@ class SwfController < ApplicationController " LEFT OUTER JOIN current_way_segments"+ " ON segment_id=current_segments.id,"+ " current_nodes AS cn1,current_nodes AS cn2"+ - " WHERE (cn1.longitude BETWEEN #{xmin} AND #{xmax})"+ - " AND (cn1.latitude BETWEEN #{ymin} AND #{ymax})"+ + " WHERE "+OSM.sql_for_area(ymin,xmin,ymax,xmax,"cn1.")+ " AND segment_id IS NULL"+ " AND current_segments.visible=1"+ " AND cn1.id=node_a AND cn1.visible=1"+