X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f4571eeb7cb4f920bb5d642c9e1c37c9495fc6ba..64f373dc598e9c672e1575622f2fc76c29655b8d:/app/controllers/way_controller.rb diff --git a/app/controllers/way_controller.rb b/app/controllers/way_controller.rb index 4d345e063..f2cda21bc 100644 --- a/app/controllers/way_controller.rb +++ b/app/controllers/way_controller.rb @@ -2,6 +2,7 @@ class WayController < ApplicationController require 'xml/libxml' before_filter :authorize, :only => [:create, :update, :delete] + before_filter :require_allow_write_api, :only => [:create, :update, :delete] before_filter :require_public_data, :only => [:create, :update, :delete] before_filter :check_api_writable, :only => [:create, :update, :delete] before_filter :check_api_readable, :except => [:create, :update, :delete] @@ -66,7 +67,7 @@ class WayController < ApplicationController user_display_name_cache = {} doc = OSM::API.new.get_xml_doc - way.nodes.each do |node| + way.nodes.uniq.each do |node| if node.visible doc.root << node.to_xml_node(changeset_cache, user_display_name_cache) end