]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/amf_controller.rb
Send replies to the right user. Closes #1720.
[rails.git] / app / controllers / amf_controller.rb
index e701f21702cf25a4596c8bf3216ece223d0936bb..de3c7583b42d9977f255a581afbc5fe9265121b2 100644 (file)
@@ -41,7 +41,7 @@ class AmfController < ApplicationController
   include MapBoundary
 
   session :off
-  before_filter :check_write_availability
+  before_filter :check_api_writable
 
   # Main AMF handlers: process the raw AMF string (using AMF library) and
   # calls each action (private method) accordingly.
@@ -490,8 +490,8 @@ class AmfController < ApplicationController
       new_relation.changeset_id = changeset_id
       new_relation.version = version
 
-
-      if id <= 0
+      # NOTE: id or relid here? id doesn't seem to be set above
+      if relid <= 0
         # We're creating the node
         new_relation.create_with_history(user)
       elsif visible