X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6c66507427961a22a8f282b5b2f4ab7fda1dad6f..e1213a4651e72beb660dddcf467d353744e3f336:/app/controllers/search_controller.rb diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 17326db07..520aa5a6f 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -111,19 +111,20 @@ class SearchController < ApplicationController # Print visible_nodes = {} + changeset_cache = {} user_display_name_cache = {} doc = OSM::API.new.get_xml_doc nodes.each do |node| - doc.root << node.to_xml_node(user_display_name_cache) + doc.root << node.to_xml_node(changeset_cache, user_display_name_cache) visible_nodes[node.id] = node end ways.each do |way| - doc.root << way.to_xml_node(visible_nodes, user_display_name_cache) + doc.root << way.to_xml_node(visible_nodes, changeset_cache, user_display_name_cache) end relations.each do |rel| - doc.root << rel.to_xml_node(user_display_name_cache) + doc.root << rel.to_xml_node(nil, changeset_cache, user_display_name_cache) end render :text => doc.to_s, :content_type => "text/xml" end