From: Tom Hughes Date: Sun, 24 Jun 2007 10:53:37 +0000 (+0000) Subject: Fix bogus SQL. X-Git-Tag: live~8327 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/91461927d44f68ad2dc10eccaaa2d3b9ce1d6f12?hp=a4647430aac69ee19d675cee86fa124b14019b00 Fix bogus SQL. --- diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 054a9ca62..be00b9f9c 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -73,7 +73,7 @@ class ApiController < ApplicationController min_lon = min_lon * 1000000 max_lon = max_lon * 1000000 # get all the points - points = Tracepoint.find(:all, :conditions => ['latitude BETWEEN ? AND ? AND longitude BETWEEN ? AND ?', min_lat.to_i, max_lat.to_i, min_lon.to_i, max_lon.to_i], :select => "SELECT DISTINCT *", :offset => offset, :limit => TRACEPOINTS_PER_PAGE, :order => "timestamp DESC" ) + points = Tracepoint.find(:all, :conditions => ['latitude BETWEEN ? AND ? AND longitude BETWEEN ? AND ?', min_lat.to_i, max_lat.to_i, min_lon.to_i, max_lon.to_i], :select => "DISTINCT *", :offset => offset, :limit => TRACEPOINTS_PER_PAGE, :order => "timestamp DESC" ) doc = XML::Document.new doc.encoding = 'UTF-8'