X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3d906fe8c6303c00e399ce2dfecc3471959fbe6e..d0f228879741a8d35ae7d9e98d3fe3c9e227a1fa:/app/controllers/way_controller.rb?ds=sidebyside diff --git a/app/controllers/way_controller.rb b/app/controllers/way_controller.rb index 2cd7abf60..f2cda21bc 100644 --- a/app/controllers/way_controller.rb +++ b/app/controllers/way_controller.rb @@ -1,8 +1,8 @@ class WayController < ApplicationController require 'xml/libxml' - session :off 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] @@ -67,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