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