a couple of minor revert fixes
authorRichard Fairhurst <richard@systemed.net>
Fri, 24 Apr 2009 20:12:43 +0000 (20:12 +0000)
committerRichard Fairhurst <richard@systemed.net>
Fri, 24 Apr 2009 20:12:43 +0000 (20:12 +0000)
app/controllers/amf_controller.rb
public/potlatch/potlatch.swf

index 6354949dac5cd9e245d4902adf83c55b776a4ea4..9d9a91f5398195d9fb7b2df5f2108191b0820d49 100644 (file)
@@ -713,17 +713,17 @@ class AmfController < ApplicationController
   # Read POI from database
   # (only called on revert: POIs are usually read by whichways).
   #
-  # Returns array of id, long, lat, hash of tags, version.
+  # Returns array of id, long, lat, hash of tags, (current) version.
 
   def getpoi(id,timestamp) #:doc:
-    if timestamp == '' then
-      n = Node.find(id)
-    else
+    n = Node.find(id)
+    v = n.version
+    unless timestamp == ''
       n = OldNode.find(id, :conditions=>['timestamp=?',DateTime.strptime(timestamp, "%d %b %Y, %H:%M:%S")])
     end
 
     if n
-      return [n.id, n.lon, n.lat, n.tags, n.version]
+      return [n.id, n.lon, n.lat, n.tags, v]
     else
       return [nil, nil, nil, {}, nil]
     end
index 459f0bdde926400109793667806152d51d199bda..a768b9992c04db80d8ee149c08c13ec29f871454 100755 (executable)
Binary files a/public/potlatch/potlatch.swf and b/public/potlatch/potlatch.swf differ