X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9e337e1ab8822fbdd61f6ed6afdb0c4e3c8727e2..0030c7753740820fab12455dd841cd39c58b6475:/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