]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/amf_controller.rb
Use correct URL for problem report control
[rails.git] / app / controllers / amf_controller.rb
index 210d3c8a4755a72a0c33216f4edc5bd8d757c30a..fb50b6aad39e0401ee64e469aa874019e9d1e221 100644 (file)
@@ -376,8 +376,9 @@ class AmfController < ApplicationController
           timestamp = DateTime.strptime(timestamp.to_s, "%d %b %Y, %H:%M:%S")
           old_way = OldWay.where("way_id = ? AND timestamp <= ?", id, timestamp).unredacted.order("timestamp DESC").first
           unless old_way.nil?
-            points = old_way.get_nodes_revert(timestamp)
-            unless old_way.visible
+            if old_way.visible
+              points = old_way.get_nodes_revert(timestamp)
+            else
               return [-1, "Sorry, the way was deleted at that time - please revert to a previous version.", id]
             end
           end
@@ -610,7 +611,8 @@ class AmfController < ApplicationController
   # 3. new way id,
   # 4. hash of renumbered nodes (old id=>new id),
   # 5. way version,
-  # 6. hash of node versions (node=>version)
+  # 6. hash of changed node versions (node=>version)
+  # 7. hash of deleted node versions (node=>version)
 
   def putway(renumberednodes, usertoken, changeset_id, wayversion, originalway, pointlist, attributes, nodes, deletednodes) #:doc:
     amf_handle_error("'putway' #{originalway}", "way", originalway) do