X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/037585db3933a2954b43bd4b30ea5e30ade00be2..1285bcbd712044720c15e2de2e6bacaf4b0b0a92:/app/controllers/search_controller.rb?ds=inline diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 8a632e6a2..0d40b6691 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -33,13 +33,13 @@ class SearchController < ApplicationController if do_nodes response.headers["Error"] = "Searching of nodes is currently unavailable" - render :text => "", :status => :service_unavailable + head :service_unavailable return false end unless value response.headers["Error"] = "Searching for a key without value is currently unavailable" - render :text => "", :status => :service_unavailable + head :service_unavailable return false end @@ -91,9 +91,9 @@ class SearchController < ApplicationController end relations.each do |rel| - doc.root << rel.to_xml_node(nil, changeset_cache, user_display_name_cache) + doc.root << rel.to_xml_node(changeset_cache, user_display_name_cache) end - render :text => doc.to_s, :content_type => "text/xml" + render :xml => doc.to_s end end