]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/amf_controller.rb
unbreak undelete
[rails.git] / app / controllers / amf_controller.rb
index ac0809219ad4ee1c23e076914efb8b04b52916ea..11594c436d25f0ba112f7939c9268bb4158f5daf 100644 (file)
@@ -560,7 +560,7 @@ class AmfController < ApplicationController
 
   # Get the latest version id of a way
   def getlastversion(id,version) #:doc:
 
   # Get the latest version id of a way
   def getlastversion(id,version) #:doc:
-    old_way = OldWay.find(:first, :conditions => ['id = ?' , id], :order => 'version DESC')
+    old_way = OldWay.find(:first, :conditions => ['visible=1 AND id=?' , id], :order => 'version DESC')
     old_way.version
   end
 
     old_way.version
   end