]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api_controller.rb
Move email configuration out of the model and into the config file
[rails.git] / app / controllers / api_controller.rb
index f84ae10764fa485fd4b05d004281ef9d5aa53a56..fc59ffcc7c0f3535c495aa632b632e4c50baa636 100644 (file)
@@ -107,7 +107,7 @@ class ApiController < ApplicationController
       trkseg << point.to_xml_node(timestamps)
     end
 
-    response.headers["Content-Disposition"] = "attachment; filename=\"map.osm\""
+    response.headers["Content-Disposition"] = "attachment; filename=\"tracks.gpx\""
 
     render :text => doc.to_s, :content_type => "text/xml"
   end
@@ -144,11 +144,6 @@ class ApiController < ApplicationController
       return
     end
 
-    if param[:restriction] and param[:restriction] != "nodes_only"
-      report_error("The parameter restriction may only take one of the following values: nodes_only")
-      return
-    end
-
     # FIXME um why is this area using a different order for the lat/lon from above???
     @nodes = Node.find_by_area(min_lat, min_lon, max_lat, max_lon, :conditions => {:visible => true}, :include => :node_tags, :limit => APP_CONFIG['max_number_of_nodes']+1)
     # get all the nodes, by tag not yet working, waiting for change from NickB
@@ -175,14 +170,6 @@ class ApiController < ApplicationController
     bounds['maxlon'] = max_lon.to_s
     doc.root << bounds
 
-    # bail out at this stage if user has indicated that he is 
-    # not interested in ways or relations.
-    if params[:restriction] == "nodes_only"
-        response.headers["Content-Disposition"] = "attachment; filename=\"map.osm\""
-        render :text => doc.to_s, :content_type => "text/xml"
-        return
-    end
-
     # get ways
     # find which ways are needed
     ways = Array.new